Commit graph

3402 commits

Author SHA1 Message Date
tokyo4j
a62441ff77 cycle: show non-dialog child windows in window switcher
Before this commit, the window switcher skipped all the child windows.

However, as child windows not marked as modal dialogs can lose focus
(ref. `desktop_focus_view()`), it will make sense to include them in the
window switcher so that users can refocus them with keyboard.
This behavior follows KWin.
2026-01-27 21:10:32 +00:00
tokyo4j
87586104cd view: add view_is_modal_dialog() 2026-01-27 21:10:32 +00:00
Johan Malm
ac94e1d44c NEWS.md: interim update 2026-01-26 20:59:49 +00:00
Consolatis
645a7b56ce docs: correct description for 'overlay enabled' config
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2026-01-21 20:30:35 +00:00
John Lindgren
aa672215b1 view: avoid restacking when view (or a sub-view) is already in front
Currently, every click within a sub-view results in first restacking
the parent view in front, and then the sub-view. This is unnecessary
and has caused issues in the past, such as with Xaw popups (which
we've worked around in d748dc78bc by adding an xcb_flush()).

It would be better not to do the unnecessary restacking at all.
2026-01-19 18:35:17 +00:00
Weblate
ee7376421c Translation updates from weblate
Co-authored-by: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: milotype <mail@milotype.de>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/hr/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/kk/
Translation: Labwc/labwc
2026-01-18 21:02:25 +00:00
John Lindgren
cd291fe051 view: avoid repeated focus changes unminimizing parent/child views
When unminimizing a group of N parent/child views, we currently end up
triggering N focus changes (as well as O(N^2) surface restackings) due
to calling desktop_focus_view() for each view in turn.

Since desktop_focus_view() already raises all sibling views together
via view_move_to_front(), let's make view_minimize() call it only once
at the very end, once all views are visible.

Test cases:
- Audacious with floating plugin views (XWayland)
- xfce4-terminal with About dialog (xdg-shell)

v2: also avoid repeated focus changes when minimizing
2026-01-18 20:38:53 +00:00
tokyo4j
7d7ece21d9 output: suppress error when output position is unavailable
This commit removes the "failed to get output layout box" error printed
when disabling an output with `wlr-randr`.

Also, use `output->scene_output->{x,y}` instead of calling
`wlr_output_layout_get_box()` for simplicity. The positions of
scene-outputs are synced with the output-layout-outputs.
2026-01-14 18:14:10 +00:00
tokyo4j
37c7de32c8 view: keep and restore the output-relative position on layout changes
Before this patch, we always tried to preserve the global positions of
floating windows across layout changes, which meant that windows could
jump to different outputs if the output coordinates changed.

Instead, this patch adds the output name and output-relative position in
`view->last_placement` to keep them across layout changes, like KDE and
GNOME do.

This also allows us to remove `view->lost_output_due_to_layout_change`,
which was required to keep the output of fullscreen/maximized windows,
since we now always try to keep `view->output` whether or not the window
is floating.
2026-01-15 02:10:31 +09:00
tokyo4j
f58b532214 view: save last placement info before layout change
I will add output name and relative view position in
`view->last_placement` later, which needs to be saved before layout
changes unlike the global position.
2026-01-15 02:10:31 +09:00
tokyo4j
a964d41dd1 view: document adjust_floating_geometry() 2026-01-15 02:10:31 +09:00
tokyo4j
ee52853e69 view: rename last_layout_geometry to last_placement.layout_geo 2026-01-15 02:10:31 +09:00
John Lindgren
20929c0484 view: rework saving/restoring geometry across layout changes
After several iterations, this is basically a complete re-work. The old
implementation was difficult to follow and sometimes failed to restore
fullscreen/maximized/tiled geometry correctly, since it was based
entirely on natural (floating) geometry.

The new implementation:
 - always saves the actual (pending) geometry at first layout change
 - explicitly tracks whether a view has moved between outputs
 - consolidates invalidating the saved geometry into one place, rather
   than having lots of invalidate() calls sprinkled everywhere
2026-01-12 17:41:02 +09:00
Vasiliy Stelmachenok
c1c156ef39 xwayland: Do not try to focus a window that was already in focus
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
2026-01-12 00:06:10 +01:00
Tomi Ollila
f09a0c2be3 scripts/check: run checkpatch.pl processes with max 16 args each
Reduce the overhead of fork/execve/perl startup time by not
doing those for every files that are checked.

This also makes the check execution complete faster.

On similar systems and similar background load, the execution time
varies based on how find(1) outputs the (*.[ch]) files it sees on
filesystem -- the filenames are not sorted but are written from
directories src/ include/ clients/ t/ in that order -- more than
80% of the time goes checking files in src/, and how the 16-file
batches from that dir (108 files in src/, 208 total, as of 2026-01)
are distributed the checkpatch.pl processes affect mostly to the
total run time.
2026-01-09 23:17:14 +01:00
Consolatis
02327e19b0 CI: disable no-font check
Void made the foot package depend on the font.

Running this test now always fails with
> `dejavu-fonts-ttf-2.37_3` in transaction breaks installed pkg `foot-1.25.0_2'

As this test uses both and the feature itself
seems to work well lets just skip it for now.
2026-01-05 17:40:28 +00:00
John Lindgren
9600c73ea4 protocols: remove wlr-input-inhibitor-unstable-v1
It appears we don't support this protocol any more. It was originally
used for swaylock, which now uses ext-session-lock-v1 instead.
2026-01-04 04:20:33 +01:00
John Lindgren
f5909ac54d view: eliminate store_natural_geometry arguments
These were added to fix handling of natural geometry for snap-to-edge
behavior back in 9021020f6e and seemed like a good idea at the time.
Since then, the number of call sites has exploded, so it seems more
maintainable to put explicit checks for interactive move within the
three functions affected.
2026-01-01 12:54:16 +00:00
tokyo4j
742c2b53fd cycle: implement scrollable OSD
Before this commit, the OSD could overflow the screen when displaying
many window items. In this commit, we hide the overflowed items and
show a scrollbar to fit the OSD within the screen.
2025-12-31 22:46:53 +00:00
tokyo4j
97b31429a0 cycle: cycle: ensure server->cycle is cleared in destroy_cycle()
...as I'm adding more state variables there for scrolling mechanism.
2025-12-31 22:46:53 +00:00
tokyo4j
9f50971e0b Halt window switcher on Reconfigure
There was an invalid memory access (since introduction of thumbnail
style in 2e9292b) with following steps:

1. Press Alt-Tab
2. Update `<windowSwitcher><osd><style>` from `classic` to `thumbnail`
3. Run `Reconfigure`
4. Press Alt-Tab again

...because `cycle_osd_thumbnail_update()` is called even though
`cycle_osd_output->items` holds `cycle_osd_classic_item`.

This commit halts window switcher on `Reconfigure` to clear
`cycle_osd_output->items` and avoid that invalid memory access.
2025-12-31 14:18:02 +01:00
tokyo4j
8ad96c0410 cycle: add server->cycle_preview_tree
This doesn't change any behaviors.
2025-12-28 21:03:03 +00:00
tokyo4j
dfe428ae14 cycle: refactor to aggregate type definitions into cycle.h
We declared `cycle_state` struct in `labwc.h` and `cycle_osd_scene`
struct in `output.h`, which was unclean in terms of separation of
concerns.

So this commit firstly moves `cycle_state` to `cycle.h`, then replaces
`cycle_osd_scene` in `output.h` with `cycle_osd_output` in `cycle.h`
which is dynamically allocated in a similar manner to
`session_lock_output`. This ensures that all states about alt-tabbing
are stored in `server->cycle`.

Also, this commit fixes a rare memory leak in `output->cycle_osd.items`
when an output is destroyed while alt-tabbing, by freeing it when the
osd tree is destroyed.
2025-12-28 20:57:37 +00:00
Consolatis
276d4e61f9 config/rcxml.c: prevent wrong parse_bool() err message
by only parsing the boolean when it is not `disabledOnExternalMouse`.

Fixes: #3293
2025-12-26 20:39:36 +00:00
Consolatis
ec9579fdc1 CI: disable IRC notifications for now
Libera started requiring an account for the IP ranges of GH CI.
This currently results in the IRC notification job running for
more than one hour because the IRC client it uses doesn't
terminate properly after giving up and thus eats our CI minutes.

The patch disables the notifications for now until we figure out
a better way, either by registering a libera account for the bot
and supplying the credentials via secret or by changing to GH
webhooks to a publicly available service like pipe.pico.sh which
then can be listened to by our existing IRC bot.
2025-12-26 16:22:58 +01:00
tokyo4j
610d869561 cycle: add <action name="NextWindow" output="" and identifier="">
Some checks failed
labwc.github.io / notify (push) Has been cancelled
output="all|focused|cursor" filters windows by the output they are on.
identifier="all|current" filters windows by their app-id.
2025-12-26 05:25:54 +09:00
tokyo4j
a5c6ff499c cycle: support <action name="NextWindow" workspace="current|all">
This commit deprecates <windowSwitcher allWorkspaces="yes|no"> and adds
per-action argument <action name="NextWindow" workspace="current|all">.
2025-12-26 05:25:54 +09:00
Consolatis
caa9b90e80 docs: add example for GTK4 composing 2025-12-23 20:11:33 +00:00
Cameron Scott McCreery
64aec6ff5d
workspaces: add config option for initial workspace selection
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-12-22 22:17:43 +01:00
tokyo4j
c9b088e343 cycle: add and use get_outputs_by_filter()
This function can be reused for filtering windows to cycle through.
2025-12-22 18:57:51 +00:00
tokyo4j
64af206114 Rename cycle_osd_output_criteria to cycle_output_filter 2025-12-22 18:57:51 +00:00
tokyo4j
e2d83ff7f5 rcxml: sync rcxml.window_switcher with XML format 2025-12-22 18:57:51 +00:00
Johan Malm
a98fd8f974 build: bump version to 0.9.3 2025-12-19 16:38:55 +00:00
Johan Malm
d1ba186fe4 NEWS.md: update notes for 0.9.3 2025-12-19 16:32:58 +00:00
Juliana Sims
7537501668 labwc-config(5): correct semantically-significant typo
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-12-16 05:42:16 +00:00
Tomi Ollila
7f0abed9c8 docs: tab to space: 4, trailing newline: -1, fit some lines to 80-cols
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-12-12 19:49:38 +00:00
tokyo4j
1317439513 rcxml: minor updates for deprecation message 2025-12-12 15:57:43 +09:00
Johan Malm
a059fbb7cb NEWS.md: interim update
...at start of cool-down period for 0.9.3
2025-12-10 18:52:21 +00:00
Consolatis
333ae306b1 desktop-entry: better handle desktop files with dots in their name
This fixes - among others - cases like `R.E.P.O..desktop`.

Due to the duplicated dot at the end we were matching against
a 0 sized string which was always true and thus would always
match the desktop file, regardless of what the app-id was.

A related issue is that an app-id of `osomething` would match
a desktop file name called `R.E.P.O.desktop` due to the string
being size of 1.

Fix this by requiring the partial desktop filename string to
be at least 3 characters wide.

Fixes #3257
2025-12-11 01:36:38 +09:00
Maik Broemme
8fdf375af3
window-switcher: add order parameter to allow stable window list ordering
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Add a new configuration option to control the window switcher traversal order.

`order="focus"` cycling is convenient for quick toggling, but some users - me as well -
prefer a stable taskbar-like order which can now be achieved with `order="age"`.
2025-12-08 18:54:23 +01:00
Johan Malm
eecb5d0947 labwc-config(5): clarify touchpad and touchscreen sections
Some checks are pending
labwc.github.io / notify (push) Waiting to run
2025-12-07 09:32:04 -05:00
John Lindgren
2f37002498 cursor: don't synthesize relative motion events from absolute events
It seems to have been inherited behavior from tinywl, but it's not clear
what purpose it serves, and it causes a couple of issues:

- A new absolute position that's discontinuous with the previous cursor
  position can produce unexpectedly large relative motion deltas. This
  can occur for example when multiple input devices are active, or in
  nested/VM scenarios when the pointer leaves the windowed output and
  re-enters at a different point.

- When the cursor position is locked via constraint, the computed deltas
  continue to get larger as the absolute event position diverges further
  from the locked position. This led to the mouse pointer going crazy in
  applications that use the relative events, such as games under Wine/
  Wayland.
2025-12-07 01:35:22 -05:00
John Lindgren
10a3281322 osd-classic: initialize struct fields in order 2025-12-07 14:55:32 +09:00
John Lindgren
1b22bf3d5a osd-classic: remove unused variable (buf) 2025-12-07 14:55:32 +09:00
John Lindgren
11959c5c5e rcxml: declare variable at initialization 2025-12-07 14:55:32 +09:00
John Lindgren
a1d8ebc0de node: update node_descriptor_create() comment 2025-12-07 14:55:32 +09:00
Johan Malm
a1119f0cb2 docs/rc.xml: populate <theme><name> to avoid empty string 2025-12-07 14:54:19 +09:00
John Lindgren
61096463fe cursor: allow movement until entering the constraint surface
Fixes an issue where the cursor would get stuck (immovable) outside the
window of a Wine/Wayland game, if it was already outside when the game
started (common with a 4:3 game on a 16:9 screen). Now one can manually
move the cursor into the game window, at which point it becomes locked.

This is a minimal/interim fix. Ideally we should warp the cursor into
the constraint area automatically, but that would be a bit more work.

The change to apply_constraint() just turns an assert-failure into a
safe no-op return, since the function is now entered for "locked" as
well as "confined" constraint types.
2025-12-06 11:04:41 -05:00
elviosak
94d33f9119
snapping: replace <snapping><range> with <snapping><range inner="" outer=""> (#3241)
Some checks failed
labwc.github.io / notify (push) Has been cancelled
<inner>/<outer> configure the size of snapping area on output edges with/without adjacent outputs.
2025-12-06 16:09:28 +09:00
Standreas
4d47b68aae
docs/rc.xml.all: add scrollMethod option 2025-12-05 19:46:18 +01:00