Commit graph

3378 commits

Author SHA1 Message Date
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
tokyo4j
06505d24c8 rcxml: discourage empty strings in rc.xml configuration
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Background:
I rewrote the config parser in 9462457..2f414a4, but it broke certain
configurations by changing how empty strings are handled: they were mostly
just ignored before my parser rewrite, but after that, they are
interpreted as just empty strings (output="" is considered as 'output named ""').

Though that was unintentional, I believe ignoring empty strings was not a
good idea in the first place, as we already allow empty strings for
certain configurations (e.g. `<desktop prefix="">`), which makes the
parser's behavior inconsistent.

Change:
So let's clarify that we intend to read empty strings as empty strings.
As a preparation, this commit adds warnings for empty strings we are
currently ignoring, so that users can be informed that we intend to just
read empty strings (e.g. `<theme name="">`) as empty strings in the future.
I removed existing empty strings in `rc.xml.all` to avoid warnings when
reading it.
2025-12-04 05:02:26 +09:00
Maik Broemme
a5db8e477a Add directional options to Resize action:
This introduces an optional "direction" argument to the Resize action,
mirroring Fluxbox's StartResizing [corner] behavior.

Supported values (case-insensitive) are:
up-left, up, up-right, left, right, down-left, down, down-right.

If no direction is specified, the existing behavior is preserved and the
resize edges are inferred from the current pointer position. The action
documentation has been updated to describe the new argument.
2025-12-04 03:01:27 +09:00
John Lindgren
d748dc78bc xwayland: flush XCB connection to mitigate race between Raise and input
Some checks are pending
labwc.github.io / notify (push) Waiting to run
2025-12-02 19:50:03 +01:00
tokyo4j
c4277ab507 cycle: update config to <osd output="all|cursor|focused">
I think `<windowSwitcher><osd output="keyboard">` is a bit unclear and
hard to interpret as "show OSD in the output with keyboard focus". Also,
we use "cursor" instead of "pointer" in other configurations like
`<placement policy="cursor">` and `<action name="ShowMenu" atCursor="">`.

So let's replace `output="all|pointer|keyboard"` with
`output="all|cursor|focused"`. In documentation, I reordered them to
`output="all|focused|cursor"` as "focused" feels like a bit more
sophisticated and general policy.
2025-12-02 17:09:54 +01:00
tokyo4j
71d29cbebb cycle: some minor updates to documentation and deprecation warnings 2025-12-02 17:09:54 +01:00
tokyo4j
499c910954 src/interactive.c: fix typo 2025-12-02 21:05:12 +09:00
John Lindgren
ba60f4d5d0 xdg: don't send xdg_wm_base::ping on creation of new surface
Although this wasn't causing any known issues, here too we weren't
handling the ping_timeout event, so it seems useless.
2025-12-02 09:21:42 +01:00
John Lindgren
d20d5675f5 xwayland: don't send _NET_WM_PING to new windows
No one remembers why we were doing this, and we do not handle the
ping_timeout event, so it seems pointless. Also it appears to confuse
some older X clients.
2025-12-02 09:21:42 +01:00
John Lindgren
7f7b5f57ec xdg: center small fullscreen views and add black background fill 2025-12-02 14:57:41 +09:00
John Lindgren
96617311cd view: use wlr_output_layout_get_box() 2025-12-02 14:57:41 +09:00
John Lindgren
27aa8173f3 view: move view_moved() out of view_impl_apply_geometry() 2025-12-02 14:57:41 +09:00
John Lindgren
5ea617a393 box: factor out box_center() 2025-12-02 14:57:41 +09:00
tokyo4j
9f5ff391cc cycle: remember cycled window list in server->cycle.views
This allows changing the cycled order in the future, e.g. focused order vs
created order.

Functionally, this commit also changes the initially selected window;
before this commit, the previous/next of the topmost window was always
selected, but now the previous/next of the active window is selected first
if it is in the cycled list. This won't change behaviors for most users,
but this ensures that the user can go back to the focused window with
Alt-Tab + Alt-Shift-Tab even when it is not the topmost window.

This commit fixes the TODO in the previous commit by trying to preserve
the selected view when a view is destroyed during window cycling.
2025-11-30 21:33:46 +00:00
tokyo4j
b6c1a9ea59 cycle: clarify the lifecycle of window switcher
This commit clarifies the lifecycle of the window switcher (cycle) by:
- init_cycle(): initializes the window switcher (e.g. OSD).
- update_cycle(): updates the window switcher states including OSD,
  preview and outlines.
- destroy_cycle(): clears all the window switcher states.

This commit temporarily regresses by not trying to preserve the selected
view when a view is destroyed. This will be addressed in the next commit.
2025-11-30 21:33:46 +00:00
tokyo4j
1783b805e1 cycle: factor out get_osd_impl() 2025-11-30 21:33:46 +00:00
tokyo4j
7527717caa cycle: move & rename destroy_osd_scenes() 2025-11-30 21:33:46 +00:00
tokyo4j
2b28c41b23 cycle: use dummy node to remember the scene position of previewed window
With this approach, we only need to store cycle->dummy_node instead of
cycle->preview_anchor and cycle->preview_parent and we don't need to care
about annoying cases like when the previewed window has no siblings or
when a window tracked by cycle->preview_anchor is destroyed.
2025-11-30 20:56:34 +09:00
tokyo4j
c1f3286cfe src/cycle/cycle.c: remove node->enabled check before _set_enabled()
wlr_scene_node_set_enabled() just returns early when it doesn't change
enabled state.
2025-11-30 20:56:34 +09:00
tokyo4j
e4ebc30c90 cursor: update focus on entering SSD if followMouse=yes
This fixes a known regression in 885919fc that cursor entering the
titlebar (and other SSD parts) doesn't update the keyboard focus even when
followMouse=yes.
2025-11-30 20:55:54 +09:00
tokyo4j
7fb060e88c cursor: clarify the semantics of update_pressed_surface()
This should not change any behaviors. This is mainly just a preparation
for the next commit.
2025-11-30 20:55:54 +09:00
tokyo4j
acb3da7903 cursor: generalize seat->pressed
This commit moduralize seat_{set,reset}_pressed() into
cursor_context_save() so that we can also have seat->hovered later.
2025-11-30 20:55:54 +09:00
tokyo4j
4fcb873f6f Use "cycle" instead of "osd" across the codebase
We were using the word "osd" to describe the window switcher, but it can
be used with on-screen display (OSD) disabled by
`<windowSwitcher><osd show="false">`. Let's use "cycle" instead to avoid
confusion.
2025-11-30 16:20:16 +09:00
tokyo4j
65cc2e40ba Rename osd.{h,c} to cycle.{h,c} 2025-11-30 16:20:16 +09:00
John Lindgren
35b3980a5b xwayland: hide content tree at re-map if shaded 2025-11-27 01:26:55 -05:00