Commit graph

3319 commits

Author SHA1 Message Date
Johan Malm
077a5c970a NEWS.md: interim update 2025-11-16 19:14:11 +00:00
John Lindgren
8ced055cb9 xwayland: remove obsolete (since wlroots 0.17) NULL check
Since d7dc6e01b4 ("Chase wlroots: Unified mapping"), the map event
is emitted by the wlr_surface itself, thus it cannot be NULL.

Change the "if" to an "assert" accordingly.
2025-11-15 12:19:31 +01:00
Hiroaki Yamamoto
b35b935ab1
cursor: remove unneeded process_cursor_motion_out_of_surface() 2025-11-15 12:14:26 +01:00
John Lindgren
9f4178955a xdg: make use of xdg_toplevel_view_get_parent() 2025-11-13 00:07:11 +01:00
John Lindgren
5543affe35 view: factor out view_impl_init_foreign_toplevel() 2025-11-13 00:07:11 +01:00
John Lindgren
51c2003ed8 xdg: remove unnecessary cast 2025-11-13 00:07:11 +01:00
David Turner
d15152b27b seat: Call configure_libinput() for keyboards
Call configure_libinput() for keyboards in new_keyboard() and
seat_reconfigure().

This allows the use of the sendEventsMode configuration option on
keyboards in order to disable keyboard input, for example:

    <libinput>
        <device category="  RPI Wired Keyboard 1">
            <sendEventsMode>no</sendEventsMode>
        </device>
    </libinput>
2025-11-12 23:59:29 +01:00
tokyo4j
366cf3c995 src/osd/osd.c: fix indentations for switch-case 2025-11-11 20:10:58 +09:00
Samet Aylak
d65caf8bfd
osd: add multi-monitor support
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Adds `output` attribute to control which monitor(s) display the window
switcher OSD. Supports three modes:
- "all": display on all monitors (default)
- "pointer": display on monitor with mouse cursor
- "keyboard": display on monitor with keyboard focus

The configuration structure is also refactored to nest OSD-specific
settings (show, style, output, thumbnailLabelFormat) under an <osd>
element within <windowSwitcher>, improving logical organization.
2025-11-10 05:16:26 +01:00
John Lindgren
79fbb611e0 view: less hacky support for minimize-before-map
The previous "minimal fix" (5148c2aa31) worked but was a bit of a
hack, as it basically un-minimized and then immediately minimized the
view again at map. It's not actually too difficult to make the map
handlers aware of minimized views, eliminating the need for the hack.

Note: this depends on the previous commit ("xwayland: connect commit
and surface_destroy handlers together") otherwise the xwayland map
handler registers the commit handler twice, leading to a crash.
2025-11-09 18:27:39 +00:00
John Lindgren
b6f7bacdde xwayland: connect commit and surface_destroy handlers together
Factor out set_surface() which consolidates connecting/disconnecting
the wlr_surface event listeners in one place.

In theory, this means we can receive commit events for minimized views.
However, with a test app that resizes itself, I didn't see any change,
i.e. the commits still don't come through until un-minimize. It's
possible they are being filtered at wlroots or protocol level.

Also remove an old, semi-related TODO from view.c.
2025-11-09 18:27:39 +00:00
elviosak
0501f0ac9e
osd: make empty string "" in thumbnailLabelFormat to not show any text (#3196) 2025-11-09 19:20:08 +09:00
John Lindgren
87da3f6588 output: factor out output_set_has_fullscreen_view() 2025-11-09 06:46:59 +01:00
John Lindgren
6de18b9afd view: update top layer visiblity at unmap instead of destroy
It's possible for a fullscreen xwayland view to be unmapped without
being destroyed. In this case, we need to update top layer visibility,
otherwise panels and the like will remain hidden.

Since unmap is always called before destroy, it's sufficient to do the
update only in view_impl_unmap() and not in view_destroy().

Adaptive sync logic needs work still, but I tried to minimize changes
to it since I don't have hardware to test it.
2025-11-09 06:46:59 +01:00
elviosak
c8167c8ee0
osd: add thumbnailLabelFormat to windowSwitcher (#3187)
Some checks failed
labwc.github.io / notify (push) Has been cancelled
This commit adds `<windowSwitcher thumbnailLabelFormat="%T">` to configure the label text in each item in the thumbnail-style window switcher. Its format follows `<fields><field content="custom" format="">`.
2025-11-05 18:23:15 +09:00
elviosak
8b950350ed docs: remove repeated words 2025-11-04 23:07:50 +01:00
tokyo4j
9197eb468a osd: allow clicking an osd item to focus the window 2025-11-04 21:29:13 +00:00
tokyo4j
00f0a46ef7 osd: generalize osd_{classic,thumbnail}_item
This allows us to share common codes for dealing with osd items.
For example:
- Get the clicked osd item to focus its associated window
- Scroll the items when their total height is taller than output height
2025-11-04 21:29:13 +00:00
tokyo4j
747163fa3e osd: rename *_scene_item to *_item 2025-11-04 21:29:13 +00:00
tokyo4j
2c0552004a osd: move end_cycling() into osd_finish()
...so that we can use `osd_finish()` to support clicking an osd item to
focus its associated window.
2025-11-02 21:30:35 +00:00
tokyo4j
7223056ffc osd-classic: substitute theme->osd_border_width+switcher_theme->padding 2025-11-02 04:32:12 +01:00
tokyo4j
9ce57c5f36 workspaces: place osd at the center of output rather than usable area 2025-11-02 04:27:39 +01:00
tokyo4j
9b6e2b71e6 osd: place osd at the center of output rather than usable area 2025-11-02 04:27:39 +01:00
tokyo4j
0f62648d39 osd: use wlr_output_effective_resolution() to get output geometry
Before this commit, output transformations were not taken into account for
parcent-based osd widths like:

osd.window-switcher.style-classic.width: 80%
osd.window-switcher.style-thumbnail.width.max: 80%
2025-11-01 17:03:37 +00:00
Weblate
ef01ebe187 Translation updates from weblate
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: sudoasd <asdwasd@meiliboxi.fi>
Co-authored-by: zenfas <zenfas66@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/fi/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/he/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/vi/
Translation: Labwc/labwc
2025-11-01 16:04:17 +00:00
tokyo4j
2d7e87ea75 osd-classic: fix miscalculation for osd width in percentage
Fixes a regression in 75eb370.
2025-11-01 16:01:58 +00:00
tokyo4j
24b9bd93fb osd-thumbnail: fix miscalculation for item geometries 2025-11-01 16:00:20 +00:00
tokyo4j
43c6e1dc22 osd-thumbnail: s/thumb_theme/switcher_them/
Just to align with other parts of the codebase.
2025-11-01 16:00:20 +00:00
tokyo4j
cd1a823fee seat: use CONNECT_SIGNAL() for new_virtual_pointer event 2025-10-25 20:41:38 +02:00
elviosak
4cdc6c435b
input/cursor.c: avoid consuming scroll on client mousebind 2025-10-24 22:26:18 +02:00
Johan Malm
df8e3d819c docs/: remove XML declarations in .xml files
...because we don't like them anymore and libxml2 does not consider them
mandatory.
2025-10-21 12:30:32 +09:00
John Lindgren
28cd504067 desktop: work around client-side rounding issues at right/bottom pixel
This also avoids a similar server-side rounding issue with some
combinations of wlroots and libwayland versions. See:

- https://gitlab.freedesktop.org/wayland/wayland/-/issues/555
- https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5159

Tested with qmpanel (similar to lxqt-panel) at 1x and 2x output scale.
Does not help if scaling is done client-side, e.g. QT_SCALE_FACTOR=2.

Fixes: #2379
Fixes: #3099
2025-10-20 20:11:08 +01:00
Johan Malm
1e406dd649 labnag: use overlay layer by default
Some checks failed
labwc.github.io / notify (push) Has been cancelled
...so that the dialog is still visible when some client is using
fullscreen mode.
2025-10-20 01:24:31 +02:00
Johan Malm
df3ed58d5b NEWS.md: interim update 2025-10-19 20:23:02 +01:00
tokyo4j
261ec3c509 scripts/check: run style check for test files
Co-authored-by: @johanmalm
2025-10-20 04:12:38 +09:00
tokyo4j
d8260feef2 CI: also run on t/ changes 2025-10-20 04:12:38 +09:00
tokyo4j
be44991def tests: remove placeholders for arguments 2025-10-20 04:12:38 +09:00
tokyo4j
7f67b9c866 Don't remove newlines when parsing config, menu and XBM
Removing newlines in rc.xml and menu.xml caused parser error with
following content:

<!--
 -
 - Some comments
 -
-->

...though it is a valid XML.

Let's not do that. I moved `grab_file()` to `buf.c` and renamed it to
`buf_from_file()`, because it now directly touches `struct buf` and
I don't like having a source file only for one function.
2025-10-17 22:08:41 +09:00
Weblate
eebf5b3e4e Translation updates from weblate
Co-authored-by: alvaroelpob <alvaropobladoresteban9@gmail.com>
Co-authored-by: p-bo <pavel.borecki@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ca/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/cs/
Translation: Labwc/labwc
2025-10-14 21:48:28 +01:00
tokyo4j
89fab2d449 theme: replace THEME_(IN)ACTIVE with SSD_(IN)ACTIVE
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-10-14 07:48:27 +02:00
Tomi Ollila
c78a0fe1b4 windowswitcher: show 's' as "state" for shaded views
While at it sorted the code to show 'm' before 's' and 's' before 'M'
- from the least visible to the most visible state.
2025-10-13 22:57:23 +02:00
Tobias Bengfort
77a11568a7 implement is_modal_dialog() for xdg shell 2025-10-14 04:19:08 +09:00
tokyo4j
953249249c rcxml: call labnag with --keyboard-focus on-demand by default
Some checks are pending
labwc.github.io / notify (push) Waiting to run
2025-10-13 19:03:43 +01:00
tokyo4j
ef73431367 labnag: add --keyboard-focus option
The new `--keyboard-focus [none|on-demand|exclusive]` option (default:
`none`) allows to some keyboard controls in labnag:

  Right-arrow or Tab: move the button selection to the right
  Left-arrow or Shift-Tab: move the button selection to the left
  Enter: press the selected button
  Escape: close labnag

The selected button is highlighted with the inner 1px border. Maybe we can
instead use different colors for the selected button, but I prefer the
inner border for now because it doesn't require us to add new color
options or make them inherit labwc's theme.
2025-10-13 19:03:43 +01:00
tokyo4j
03c70e8a5e labnag: remove redundant lines in conf_init() 2025-10-13 19:03:43 +01:00
tokyo4j
2b3aadb6af labnag: s/LAB_EXIT_TIMEOUT/LAB_EXIT_CANCELLED/ 2025-10-13 19:03:43 +01:00
Consolatis
364a1d5207 osd: allow window switcher to temporary unshade windows
This can be configured with a new unshade="yes|no"
argument for windowSwitcher in rc.xml

Fixes: #3111
2025-10-13 19:45:46 +02:00
tokyo4j
babd7af8f8 view: store title/app_id in view
This simplifies our codes and eliminates duplicated
`view.events.new_{title,app_id}` events. This should not change any
behaviors.
2025-10-14 02:27:13 +09:00
tokyo4j
27cc738985 osd-thumbnail: make sure item->{normal,active}_title are non-null
The if-statement doesn't make sense, because `view_get_string_prop()`
never returns NULL. And if it did, it would cause segfault in
`osd_thumbnail_update()`.
2025-10-14 02:27:13 +09:00
John Lindgren
da96513e70 menu: remove redundant cast
Some checks are pending
labwc.github.io / notify (push) Waiting to run
2025-10-12 14:15:19 -04:00