Commit graph

95 commits

Author SHA1 Message Date
tokyo4j
2f96664670 build: fix build with libinput as a subproject
Unfortunately, has_header_symbol() doesn't work with internal dependencies.

Ref: https://github.com/mesonbuild/meson/issues/13553
2025-10-11 23:51:28 +09:00
Johan Malm
70e5beb5ec build: bump version to 0.9.2
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-10-10 19:53:23 +01:00
Johan Malm
27f3097f8f build: add 'sections' option to show unused functions 2025-09-29 20:22:46 +01:00
01micko
3499f40a6b meson.build: move lab-sensible-terminal install routine.
Moved to clients/meson.build as per the comment in meson.build.
2025-08-30 11:14:07 +01:00
Johan Malm
c63d35c942 Add labnag
Based on swaynag (https://github.com/swaywm/sway/tree/master/swaynag)

Copied at commit:
03483ff370

Contains the following modifiations:

- Some functional changes including:
  - Disable exclusive-zone by default (Written-by: @Consolatis) and add
    command line option -x|--exclusive-zone
  - Add close timeout (Written-by: @Consolatis) and -t|--timeout option
  - Use index of button (from right-to-left) for exit code
  - Disable reading from config file and remove associated --type option
- Refactoring including:
  - Use wlr_log() instead of the log.{c,h} functions
  - Use wl_list instead of sway's list.c implementation
  - In the pango wrapper functions, use glib's g_strdup_vprintf() rather
    than the original stringop.c functions
- Align with labwc coding style to pass checkpatch.pl
- Re-licenced from MIT to GPL-2.0, and add Copyright notices for original
  authors

v2

- Remove option -s|--dismiss-button and the default "X" button. To get
  such a button, "-Z X :"
- Remove options -b and -z because there is no requirement to run
  in a terminal.
- Remove *-no-terminal from options --button and --button-dismiss because
  commands are now always run directly without a terminal.

v3

- Allow -B/-Z options without action-argument
- Invert button order of -B/-Z so that `labnag -m foo -Z x -Z y -Z z`
  results in three buttons with "x" furthest to the left, and "z" on the
  right (rather than the other way around).
- Use signalfd() to prevent race conditions on SIGTERM

v4

- Limit number of stdin lines to 200 to avoid hogging CPU

Co-Authored-by: tokyo4j
2025-08-09 10:44:03 +01:00
Johan Malm
4beee3851f build: bump version to 0.9.0 2025-07-11 21:52:18 +01:00
Johan Malm
e94781ef3f Add lab-sensible-terminal
Related-to: #2843 #2842
2025-07-01 22:27:33 +01:00
Consolatis
7cc77f9885 meson.build: require xwayland version 21.1.9 for xwayland support
This and later xwayland releases ship fixes for drm leased devices
causing lags in Chromium and Electron based applications. We used
to work around the issue by simply not sending drm leases to xwayland
but we can now rely on the fixes being widely available.
See #553 for more information.
2025-06-28 20:33:57 +01:00
Consolatis
a8df2487b2 xwayland: support _NET_WM_ICON 2025-06-18 14:31:05 +09:00
may
e96b5af42d libinput: implement threeFingerDrag feature 2025-06-07 21:30:07 +09:00
tokyo4j
22d319cce8 libinput: support <dragLock>sticky<dragLock> and enable it by default
It is recommended by libinput:
https://lists.freedesktop.org/archives/wayland-devel/2024-November/043860.html
2025-06-07 12:46:53 +01:00
tokyo4j
68bf55d724 Add -Wshadow + reformat switch cases
Adding -Wshadow will prevent unintentional variable overrides.

Also, wrapping switch cases with declarations with braces will make our
logic more robust by limiting lifetimes of variables.
2025-05-23 21:32:17 +01:00
Consolatis
78681813cc Protocols: use upstream wayland-protocols for ext-workspace-v1.xml 2025-05-23 21:25:23 +01:00
Andri Yngvason
34947b7791 Enable ext-image-copy-capture-v1 2025-05-22 11:51:06 +02:00
John Lindgren
cb0db3542d chase wlroots: pin to first 0.19.0-dev commit
Ref: b10516e1e8352f3140d68fa580b0ed32e13c2d58
("build: bump version to 0.19.0-dev")
2025-05-21 06:36:08 +01:00
Johan Malm
9af441ecd3 build: bump version to 0.8.4 2025-05-02 16:41:57 +01:00
Johan Malm
1fe4797a9d build: bump version to 0.8.3 2025-02-21 20:23:11 +00:00
Johan Malm
c3a1a59a58 build: bump version to 0.8.2 2024-12-13 19:14:37 +00:00
Consolatis
4415178707 meson.build: increase wlroots dep to 0.18.1
This ensures users do not run into asserts()
when using the ext-foreign-toplevel-list protocol.
2024-11-09 20:06:19 +00:00
Johan Malm
6bd36e8512 build: bump version to 0.8.1 2024-10-25 19:51:27 +01:00
Johan Malm
3a4e0cf981 build: require libsfdo >=0.1.3 2024-10-24 23:10:08 +02:00
tokyo4j
eb8db30a86 build: allow disabling icon when libsfdo is installed system-wide 2024-10-04 20:29:32 +01:00
Rick Calixte
5b774e6e99
Add labwc to XDG_CURRENT_DESKTOP to support a portals.conf (#1716)
The previous `UseIn` key was deprecated in xdg-desktop-portal 1.17/1.18.
It has been superceded by the portals.conf structure so that each
desktop can configure the precise desired structure for portals. In
addition, support was added to the Desktop Entry Specifications to
support a `DesktopNames` key that login managers will use to set
XDG_CURRENT_DESKTOP.

* [portals.conf
  Documentation](https://github.com/flatpak/xdg-desktop-portal/blob/main/doc/portals.conf.rst.in)
* [Example
  sway-portals.conf](https://salsa.debian.org/swaywm-team/sway/-/blob/debian/sid/debian/sway-portals.conf)
* [Desktop Entry
  Specifications](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)

Ref: flatpak/xdg-desktop-portal#955
2024-10-01 21:33:45 +01:00
tokyo4j
a745f91169 ssd: support window icons
The default `titleLayout` is updated to `icon:iconify,max,close` which
replaces the window menu button with the window icon.

When the icon file is not found or could not be loaded, the window menu
icon as before is shown.

The icon theme can be selected with `<theme><icon>`.

This commit adds libsfdo as an optional dependency. `-Dicon=disabled` can
be passsed to `meson setup` command in order to disable window icon, in
which case the window icon is always replaced with a window menu button.
2024-09-25 18:04:09 +09:00
Johan Malm
e5f60ce8a7 ci: use -Wno-expansion-to-defined to avoid Arch CI error
...with this warning message:

[100/161] Compiling C object labwc.p/src_button_button-svg.c.o
FAILED: labwc.p/src_button_button-svg.c.o
gcc -Ilabwc.p -I. -I.. -Iinclude -I../include -I/usr/include/wlroots-0.18 -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/lib/pkgconfig/../../include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wunused-macros -Wno-unused-parameter '-DLABWC_VERSION="0.8.0"' '-DGETTEXT_PACKAGE="labwc"' '-DLOCALEDIR="/usr/local/share/locale"' -pthread -MD -MQ labwc.p/src_button_button-svg.c.o -MF labwc.p/src_button_button-svg.c.o.d -o labwc.p/src_button_button-svg.c.o -c ../src/button/button-svg.c
In file included from ../src/button/button-svg.c:7:
/usr/lib/pkgconfig/../../include/librsvg-2.0/librsvg/rsvg.h:1331:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
 1331 | #if LIBRSVG_CHECK_FEATURE(PIXBUF)
      | ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2024-09-24 07:15:13 +09:00
Johan Malm
a368bbee6a Add unit test for common/buf.c 2024-08-20 18:31:53 +02:00
Johan Malm
98c876d796 build: bump version to 0.8.0 2024-08-16 16:41:36 +01:00
Consolatis
0d00e9a232 chase: move to stable tablet protocol and require w-p >= 1.35
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4645
2024-07-17 21:28:59 +01:00
Consolatis
924e31f089 chase: version pkgconfig, headers, and library
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4614
2024-07-17 21:28:59 +01:00
Consolatis
d1fbb3c7cc chase: wlroots version dep to 0.18 2024-07-17 21:28:59 +01:00
Johan Malm
307f199158 build: bump version to 0.7.3 2024-07-12 17:27:36 +01:00
Johan Malm
b41af54a1b build: bump version to 0.7.2 2024-05-10 21:11:21 +01:00
Consolatis
b959e23d6d CI: enable gcc static analyzer 2024-04-10 08:14:59 +02:00
Johan Malm
59014e5071 build: bump version to 0.7.1 2024-03-01 21:18:02 +00:00
Rick Calixte
14f5733584 meson.build: install badges for labwc and migrate to data/
A .desktop file was previously added for the labwc session, this adds a
badge for it where it is supported. The .desktop files and the badges
are also moved to `data/`.

Ref: #36, 9fa783e, labwc/labwc-artwork#7
2024-02-03 22:05:28 +00:00
Johan Malm
eb41fb1e0b build: bump version to 0.7.0 2023-12-22 17:03:32 +00:00
Consolatis
ddc9047a67 Restore nested resize
Chases: 756ecf8ee9f1e75bc7b8297dc84f97c7d699174b
backend/wayland: use request_state when toplevel is resized

Chases: 3ef68a484243555b020200c6f95246d994932c3f
backend/x11: use request_state when window is resized

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2693

We now delay requested resolution changes by the backend until
the next frame event which causes us to render the new content
on the already enlarged buffer. Before this change, an empty
(black) buffer would have been shown instead before the next
frame event caused a new render of the actual contents.

Keep commiting the new state and then scheduling a frame event
would not help as due to the commit call it would still show an
empty buffer in the meantime.

Just modifying wlr_output->pending wouldn't work either because
wlr_scene_output_commit() *completely* ignores it (and it will
be removed in future wlroots commits). For this reason we move
to wlr_scene_output_build_state() directly because it allows us
to supply the current wlr_output->pending state and thus apply
any resolution change in lockstep with new rendering. Result:
No more flickering in the wayland backend and resizing is again
smooth as butter.

This prevents constant flicker while resizing
when running nested via the wayland backend.

For the X11 backend (can be tested via `WLR_BACKENDS=x11 labwc`),
it is still rather janky but at least doesn't cause endless self-
resizing anymore.
2023-11-27 21:01:53 +00:00
Consolatis
5feda28f12 Chase wlroots: Update meson.build wlroots requirement to >= 0.17 2023-11-27 21:01:53 +00:00
Johan Malm
7af5f1d5ce build: bump version to 0.6.6 2023-11-25 21:14:12 +00:00
Johan Malm
48e0b3f6a6 build: bump version to 0.6.5 2023-09-23 16:54:34 +01:00
Johan Malm
715405fe29 build: make svg buttons optional
Add -Dsvg=disabled to your meson setup/configure command to disable svg
buttons even if the correct version of librsvg is available.

Note that regardless of this patch and the value of the 'svg' variable,
the build will gracefully fall back to not using librsvg if the correct
version is not available.

Helped-by: @01micko
2023-09-17 19:26:41 +01:00
Johan Malm
c62df26c2a Support svg buttons
In the theme directory add close-{active,inactive}.svg instead of
close.xbm - and similarly for iconify, menu and max.
2023-09-17 19:26:41 +01:00
Johan Malm
a6a03daae3 Support png buttons
In the theme directory add close-{active,inactive}.png instead of
close.xbm - and similarly for iconify, menu and max.
2023-08-09 07:38:17 +01:00
Johan Malm
6b83db34af build: bump version to 0.6.4 2023-07-14 20:44:38 +01:00
Johan Malm
63db731cf4 build: bump version to 0.6.3 2023-05-08 07:29:12 +01:00
Johan Malm
7914d06760 build: bump version to 0.6.2 2023-03-20 20:21:09 +00:00
Consolatis
82e9e866ec Enable more compiler warnings 2023-02-01 10:42:22 +01:00
Johan Malm
a3fff9f87b build: bump version to 0.6.1 2023-01-29 16:22:09 +00:00
Jan Beich
1e66ba8fd7 build: drop pixman dependency after 532656ad5b 2022-11-18 10:37:51 +01:00
Johan Malm
029700f0bf build: bump version to 0.6.0 2022-11-17 22:13:55 +00:00