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.
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.
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
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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
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"`.
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.
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.