Commit graph

3214 commits

Author SHA1 Message Date
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
cc84cee75b scaled-icon-buffer: don't render twice in scaled_icon_buffer_set_view() 2025-06-07 08:54:34 +01:00
tokyo4j
624cf85afe view: simplify freeing of view->icon 2025-06-07 08:51:37 +01:00
Consolatis
74018495cd view.c: free icon name on view destroy 2025-06-07 08:33:22 +01:00
Consolatis
4d79f0057f Ensure the view signals are initialized early
This prevents a crash observed by the scaled-icon-buffer listening
to the `view->events.set_icons` signal before it is initialized.
For this to happen, the application needs to use the kde decoration
protocol and set it on the xdg_surface before creating the xdg_toplevel.

Fixes: #2798
2025-06-07 05:03:57 +02:00
Johan Malm
6cb34f994c labwc-config(5): add example to unset mousebind 2025-06-06 23:46:33 +02:00
tokyo4j
073d8c39c1 scaled-icon-buffer: fix window icons not loaded after Reconfigure
This patch fixes the issue that window icons become the fallback
one after Reconfigure, by setting scaled_icon_buffer->view_app_id (and
other properties) in scaled_icon_buffer_set_view().

The reason why the window icons were displayed before Reconfigure is that
applications usually enable decorations and then set app_id which fires
handle_view_set_icon().
2025-06-06 21:47:43 +02:00
tokyo4j
fb077c0095 Support xdg-toplevel-icon protocol
This patch also changes the semantics of scaled_icon_buffer: rather than
calling scaled_icon_buffer_set_app_id() every time an app_id is set, we
can now call scaled_icon_buffer_set_view() just once so that multiple
scaled_icon_buffers bound to a window are automatically updated when an
app_id is set or new icon is set via xdg-toplevel-icon-v1.
2025-06-07 02:12:56 +09:00
tokyo4j
649773b4f8 buffer: add buffer_create_from_wlr_buffer() 2025-06-07 02:12:56 +09:00
tokyo4j
82b0235aca buffer: add buffer_resize() 2025-06-07 02:12:56 +09:00
tokyo4j
0657a1d767 view: add destroy signal 2025-06-07 02:12:56 +09:00
DreamMaoMao
614c008bea feat: add left-occupied and right-occupied to workspaces_find 2025-06-06 18:35:32 +02:00
DreamMaoMao
5cf4aa83e2 view.c: add new NO_OMNIPRESENT criteria 2025-06-06 18:35:32 +02:00
dd
c5b9e2665d
ssd: add configurable drop-shadows for tiled windows 2025-06-05 22:46:58 +02:00
John Lindgren
0908bb5dd1 xdg: add missing tracking of configure serials
In some cases, we would schedule a configure event but not record that
we had done so, leaving view->pending_configure_serial incorrect. This
caused incorrect handling of in-flight commits that had not yet taken
the new configure into account, such as assuming that the client had
ignored the configured size and incorrectly resetting view->pending.

Fixes: #2774
2025-06-05 05:49:17 +09:00
Johan Malm
ea294dbcf5 labwc-config(5): describe environment file comment syntax 2025-06-03 17:23:14 +01:00
Johan Malm
7bf08af210 layers: arrange layers on destroy
...rather than unmap because that is the approach of sway and it also
avoids wshowkeys crashing.

Fixes: #1153
2025-06-02 22:00:43 +01:00
Consolatis
ca94abbef1 CI: wlroots package for Arch has been renamed 2025-06-01 23:34:46 +02:00
tokyo4j
949d769198 docs: update documentations for osd fields 2025-05-29 11:19:26 +09:00
tokyo4j
f2be08822f osd: always show output name with <field content="output">
Before this patch, output names were not shown if there's only one output.
2025-05-29 04:10:55 +02:00
tokyo4j
a157999925 osd: always show title with <field content="title">
Before this patch, titles were not shown if they are identical to the
identifiers.
2025-05-29 04:10:55 +02:00
Consolatis
fdab272bdc Add scroll method libinput option
<libinput>
  <device>
    <scrollMethod>none|twofinger|edge</scrollMethod>
  </device>
</libinput>

Fixes: #2766
2025-05-28 14:43:51 +09:00
Consolatis
8ba14891fa src/layers.c: send fractional scale before map 2025-05-28 14:15:03 +09:00
tokyo4j
c4f683c70d Rename some handler functions to be more consistent 2025-05-27 13:13:51 +02:00
tokyo4j
f4a85860cf xdg-popup: use CONNECT_SIGNAL() macro 2025-05-27 13:13:51 +02:00
Weblate
aff7cb92e4 Translation updates from weblate
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/hu/
Translation: Labwc/labwc
2025-05-25 22:32:03 +01:00
zeusgoose
8e9751ea92 documentation: s/view/window/ 2025-05-25 01:31:40 +09:00
Johan Malm
f2b020b239 NEWS.md: minor fix to make github markdown render correctly 2025-05-23 23:02:15 +02:00
tokyo4j
8ff779ca25 CONTRIBUTING.md: document use of braces in switch statements 2025-05-23 21:32:17 +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
e19f0fc267 server.c: add missing privileged protocols 2025-05-23 21:25:23 +01:00
Consolatis
78681813cc Protocols: use upstream wayland-protocols for ext-workspace-v1.xml 2025-05-23 21:25:23 +01:00
tokyo4j
c870043a8a common/img/img-xbm: avoid using global variables 2025-05-23 09:57:55 +09:00
John Lindgren
fd5031731e xwayland: use wlr_xwayland_surface_has_window_type()
This eliminates a bit of logic, including an extra XWayland connection.

See also:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4553
2025-05-22 23:09:41 +01:00
John Lindgren
a3d6226728 treewide: remove empty statements in switch cases
For longer cases, factor out the logic to new functions.
For very short cases, just move the declaration before the switch.

v2: in one case, replace the switch with if/else.
2025-05-22 22:52:43 +01:00
alex-huff
fbb92e2e30 layer-shell: only configure initialized layer surfaces
Fixes #2736
2025-05-22 22:35:03 +01:00
Johan Malm
bfa3e54c9d wlroots.wrap: use branch not tag
Make revision= track the 0.19 branch rather than a specific tag.
2025-05-22 23:30:08 +02:00
zeusgoose
32ea970b1b drm_syncobj check backend support for timelines
ref: 17e2e52c6d
2025-05-22 20:29:24 +02:00
zeusgoose
052035e7d9 drm_syncobj_v1
ref: 05e895c463
2025-05-22 12:04:42 +02:00
Andri Yngvason
34947b7791 Enable ext-image-copy-capture-v1 2025-05-22 11:51:06 +02:00
John Lindgren
423cb6923f xwayland: better support for keyboard focus grabs
Use the new grab_focus signal as a more reliable way to tell when an
unmanaged (override-redirect) surface wants focus.
2025-05-21 20:30:19 +02:00
John Lindgren
c00baa1651 xwayland: use wlr_xwayland_surface_offer_focus()
Offer focus by sending WM_TAKE_FOCUS to a client window supporting it.
The client may accept or ignore the offer. If it accepts, the surface will
emit a focus_in signal notifying the compositor that it has received focus.
The compositor should then call wlr_xwayland_surface_activate(surface, true).

This is a more compatible method of giving focus to windows using the
Globally Active input model (see wlr_xwayland_icccm_input_model()) than
calling wlr_xwayland_surface_activate() unconditionally, since there is no
reliable way to know in advance whether these windows want to be focused.

v2: add caution not to use view_offer_focus() directly
v3: remove obsolete comment
2025-05-21 20:30:19 +02:00
tokyo4j
95552c261d config: reorder if-statements for aesthetics 2025-05-21 21:27:57 +09:00
tokyo4j
b299404811 config: drop xwayland persistence workaround for wlroots < 0.18.2
We enabled xwayland persistence for wlroots < 0.18.2 to prevent crashes,
but it's no longer needed since we now depend on wlroots 0.19.
2025-05-21 21:27:57 +09:00
tokyo4j
7969aa267e common/box: drop box_contains() 2025-05-21 13:55:59 +02:00
Johan Malm
51844c7fc9 docs/autostart: add example for delayed start 2025-05-21 20:18:27 +09:00
Johan Malm
2265dd647a labwc-actions(5): add example for ShowMenu with wtype
Related-to: #2726
2025-05-21 12:44:21 +02:00
Consolatis
08a6e29eb9 Update to wlroots 0.19.0 release 2025-05-21 06:36:08 +01:00
John Lindgren
8010f6e659 chase wlroots: remove #include <wlr/types/wlr_matrix.h>
Ref: 9b55737cf512ae5132b10633b83e099d46fa259f
("Make wlr_matrix private API")
2025-05-21 06:36:08 +01:00
Consolatis
d7ecbbd50c chase wlroots: add wlr_buffer_finish() to buffer destroy handler
Ref: 7963ba6a0deb5b696050d914ac395bca9c4c06b2
("buffer: introduce wlr_buffer_finish()")
2025-05-21 06:36:08 +01:00