Commit graph

3305 commits

Author SHA1 Message Date
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
John Lindgren
40eed3915a osd,ssd: don't cast away const 2025-10-12 14:15:19 -04:00
John Lindgren
e6f54a0fc8 menu: use xmlFree() for return value of xmlGetProp() 2025-10-12 14:15:19 -04:00
tokyo4j
5e8df27f84 osd-classic: add theme options for selected window item
This commit adds new theme options:
- osd.window-switcher.style-classic.item.active.border.color
- osd.window-switcher.style-classic.item.active.bg.color

These theme options configures the border/background of selected window
item in the `classic` style window switcher. Their default values are
identical to `thumbnail` style window switcher, which means the default
border color is now `osd.label.text.color` with 50% opacity and the
default background color is now `osd.label.text.color` with 15% opacity.
2025-10-13 01:46:43 +09:00
tokyo4j
5f981226c2 action: simplify action_prompt_command() 2025-10-11 23:53:02 +09:00
tokyo4j
2f96664670 build: fix build with libinput as a subproject
Unfortunately, has_header_symbol() doesn't work with internal dependencies.

Ref: https://github.com/mesonbuild/meson/issues/13553
2025-10-11 23:51:28 +09:00
Johan Malm
70e5beb5ec build: bump version to 0.9.2
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-10-10 19:53:23 +01:00
tokyo4j
d94e5da815 view: fix unexpected view->tiled with SnapToEdge against centered view
In 2ac4811, I was missing that windows can be tiled to "center".
As a result, after executing
`<action name="SnapToEdge" combined="yes" direction="left" />` against a
center-tiled window, `view->tiled` is set to `CENTER|LEFT`.
2025-10-10 19:48:42 +01:00
Johan Malm
e44a489530 NEWS.md: update notes for 0.9.2 2025-10-10 19:37:40 +01:00
tokyo4j
6cdfe32af0 rcxml: move <maximizedDecoration> from <core> to <theme> 2025-10-09 22:01:05 +01:00
Tobias Bengfort
e1820adcd3 fix typo in comment 2025-10-10 00:19:22 +09:00
Tobias Bengfort
474c513ed6 fix double free for libxml2 < 2.13
xmlAddChild() only unlinks the second argument since libxml2 2.13.

regression from 503af105
2025-10-10 00:19:22 +09:00
tokyo4j
c27d4955a4 desktop-entry: fix wrong description of sfdo-icon flags 2025-10-09 00:59:43 +02:00
Consolatis
7166efe7bf CI: also run on clients/ changes 2025-10-08 22:17:48 +02:00
Johan Malm
017152da52 build: use spaces instead of tab 2025-10-08 21:05:25 +01:00