]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
9 months agoAdd scroll method libinput option
Consolatis [Tue, 27 May 2025 12:19:21 +0000 (14:19 +0200)]
Add scroll method libinput option

<libinput>
  <device>
    <scrollMethod>none|twofinger|edge</scrollMethod>
  </device>
</libinput>

Fixes: #2766
9 months agosrc/layers.c: send fractional scale before map
Consolatis [Tue, 27 May 2025 16:55:00 +0000 (18:55 +0200)]
src/layers.c: send fractional scale before map

9 months agoRename some handler functions to be more consistent
tokyo4j [Tue, 27 May 2025 07:11:49 +0000 (16:11 +0900)]
Rename some handler functions to be more consistent

9 months agoxdg-popup: use CONNECT_SIGNAL() macro
tokyo4j [Tue, 27 May 2025 07:11:15 +0000 (16:11 +0900)]
xdg-popup: use CONNECT_SIGNAL() macro

9 months agoTranslation updates from weblate
Weblate [Sun, 25 May 2025 21:26:43 +0000 (23:26 +0200)]
Translation updates from weblate

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/hu/
Translation: Labwc/labwc

9 months agodocumentation: s/view/window/
zeusgoose [Sat, 24 May 2025 15:44:39 +0000 (10:44 -0500)]
documentation: s/view/window/

9 months agoNEWS.md: minor fix to make github markdown render correctly
Johan Malm [Fri, 23 May 2025 20:38:32 +0000 (21:38 +0100)]
NEWS.md: minor fix to make github markdown render correctly

9 months agoCONTRIBUTING.md: document use of braces in switch statements
tokyo4j [Fri, 23 May 2025 05:11:57 +0000 (14:11 +0900)]
CONTRIBUTING.md: document use of braces in switch statements

9 months agoAdd -Wshadow + reformat switch cases
tokyo4j [Fri, 23 May 2025 04:09:15 +0000 (13:09 +0900)]
Add -Wshadow + reformat switch cases

Adding -Wshadow will prevent unintentional variable overrides.

Also, wrapping switch cases with declarations with braces will make our
logic more robust by limiting lifetimes of variables.

9 months agoserver.c: add missing privileged protocols
Consolatis [Fri, 23 May 2025 11:27:06 +0000 (13:27 +0200)]
server.c: add missing privileged protocols

9 months agoProtocols: use upstream wayland-protocols for ext-workspace-v1.xml
Consolatis [Fri, 23 May 2025 11:26:23 +0000 (13:26 +0200)]
Protocols: use upstream wayland-protocols for ext-workspace-v1.xml

9 months agocommon/img/img-xbm: avoid using global variables
tokyo4j [Thu, 22 May 2025 06:42:41 +0000 (15:42 +0900)]
common/img/img-xbm: avoid using global variables

9 months agoxwayland: use wlr_xwayland_surface_has_window_type()
John Lindgren [Wed, 21 May 2025 15:43:50 +0000 (11:43 -0400)]
xwayland: use wlr_xwayland_surface_has_window_type()

This eliminates a bit of logic, including an extra XWayland connection.

See also:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4553

9 months agotreewide: remove empty statements in switch cases
John Lindgren [Thu, 22 May 2025 14:53:58 +0000 (10:53 -0400)]
treewide: remove empty statements in switch cases

For longer cases, factor out the logic to new functions.
For very short cases, just move the declaration before the switch.

v2: in one case, replace the switch with if/else.

9 months agolayer-shell: only configure initialized layer surfaces
alex-huff [Thu, 22 May 2025 20:22:05 +0000 (15:22 -0500)]
layer-shell: only configure initialized layer surfaces

Fixes #2736

9 months agowlroots.wrap: use branch not tag
Johan Malm [Thu, 22 May 2025 21:25:27 +0000 (22:25 +0100)]
wlroots.wrap: use branch not tag

Make revision= track the 0.19 branch rather than a specific tag.

9 months agodrm_syncobj check backend support for timelines
zeusgoose [Thu, 22 May 2025 15:39:39 +0000 (15:39 +0000)]
drm_syncobj check backend support for timelines

ref: https://github.com/swaywm/sway/commit/17e2e52c6d1bf4bfebde8f6b2869702aacc3750a

9 months agodrm_syncobj_v1
zeusgoose [Wed, 21 May 2025 23:19:39 +0000 (23:19 +0000)]
drm_syncobj_v1

ref: https://github.com/swaywm/sway/commit/05e895c4638293a6bfe594ff0cae4eaab63b740e

9 months agoEnable ext-image-copy-capture-v1
Andri Yngvason [Sun, 8 Dec 2024 20:52:57 +0000 (20:52 +0000)]
Enable ext-image-copy-capture-v1

9 months agoxwayland: better support for keyboard focus grabs
John Lindgren [Wed, 14 Feb 2024 03:25:20 +0000 (22:25 -0500)]
xwayland: better support for keyboard focus grabs

Use the new grab_focus signal as a more reliable way to tell when an
unmanaged (override-redirect) surface wants focus.

9 months agoxwayland: use wlr_xwayland_surface_offer_focus()
John Lindgren [Sat, 20 Jul 2024 15:25:10 +0000 (11:25 -0400)]
xwayland: use wlr_xwayland_surface_offer_focus()

Offer focus by sending WM_TAKE_FOCUS to a client window supporting it.
The client may accept or ignore the offer. If it accepts, the surface will
emit a focus_in signal notifying the compositor that it has received focus.
The compositor should then call wlr_xwayland_surface_activate(surface, true).

This is a more compatible method of giving focus to windows using the
Globally Active input model (see wlr_xwayland_icccm_input_model()) than
calling wlr_xwayland_surface_activate() unconditionally, since there is no
reliable way to know in advance whether these windows want to be focused.

v2: add caution not to use view_offer_focus() directly
v3: remove obsolete comment

9 months agoconfig: reorder if-statements for aesthetics
tokyo4j [Wed, 21 May 2025 12:15:38 +0000 (21:15 +0900)]
config: reorder if-statements for aesthetics

9 months agoconfig: drop xwayland persistence workaround for wlroots < 0.18.2
tokyo4j [Wed, 21 May 2025 11:51:13 +0000 (20:51 +0900)]
config: drop xwayland persistence workaround for wlroots < 0.18.2

We enabled xwayland persistence for wlroots < 0.18.2 to prevent crashes,
but it's no longer needed since we now depend on wlroots 0.19.

9 months agocommon/box: drop box_contains()
tokyo4j [Wed, 21 May 2025 11:43:17 +0000 (20:43 +0900)]
common/box: drop box_contains()

9 months agodocs/autostart: add example for delayed start
Johan Malm [Tue, 20 May 2025 20:15:45 +0000 (21:15 +0100)]
docs/autostart: add example for delayed start

9 months agolabwc-actions(5): add example for ShowMenu with wtype
Johan Malm [Wed, 21 May 2025 05:33:02 +0000 (06:33 +0100)]
labwc-actions(5): add example for ShowMenu with wtype

Related-to: #2726
9 months agoUpdate to wlroots 0.19.0 release
Consolatis [Sat, 8 Feb 2025 16:13:40 +0000 (17:13 +0100)]
Update to wlroots 0.19.0 release

9 months agochase wlroots: remove #include <wlr/types/wlr_matrix.h>
John Lindgren [Sun, 2 Feb 2025 21:02:47 +0000 (16:02 -0500)]
chase wlroots: remove #include <wlr/types/wlr_matrix.h>

Ref: 9b55737cf512ae5132b10633b83e099d46fa259f
("Make wlr_matrix private API")

9 months agochase wlroots: add wlr_buffer_finish() to buffer destroy handler
Consolatis [Tue, 15 Apr 2025 04:40:40 +0000 (06:40 +0200)]
chase wlroots: add wlr_buffer_finish() to buffer destroy handler

Ref: 7963ba6a0deb5b696050d914ac395bca9c4c06b2
("buffer: introduce wlr_buffer_finish()")

9 months agochase wlroots: new presentation_time version MR 4858
Consolatis [Wed, 27 Nov 2024 03:27:21 +0000 (04:27 +0100)]
chase wlroots: new presentation_time version MR 4858

Ref: 4c74a8843a08a39d6278de4a26759d93155feb2c
("presentation-time: bump protocol version to v2")

9 months agochase wlroots: use WLR_PRIVATE (MR 4842)
Consolatis [Wed, 27 Nov 2024 03:48:45 +0000 (04:48 +0100)]
chase wlroots: use WLR_PRIVATE (MR 4842)

Ref: 6006023a377868187f73d2e0922bbe952072684f
("Use WLR_PRIVATE for private fields")

9 months agochase wlroots: simplify transforms in scene-helpers (MR 4819/4845)
tokyo4j [Fri, 25 Apr 2025 09:35:05 +0000 (18:35 +0900)]
chase wlroots: simplify transforms in scene-helpers (MR 4819/4845)

Ref: 009515161bd97d8f920d72d31ef462f2608688e8
("scene: Only accept buffer coordinates for damage")

Note:
MR 4819 is immediately followed by MR 4845.
MR 4819 removes return value of wlr_damage_ring_add().
MR 4845 applies applies buffer-local coordinates for
scene_output->damage_ring instead of transformed coordinates.

9 months agochase wlroots: wlr_damage_ring_add no return val (MR 4817)
Consolatis [Wed, 27 Nov 2024 03:51:25 +0000 (04:51 +0100)]
chase wlroots: wlr_damage_ring_add no return val (MR 4817)

Ref: 502eb38d80eb5a273f5481ec8559cb35d726f5da
("damage_ring: Remove return value of wlr_damage_ring_add/wlr_damage_ring_add_box")

9 months agochase wlroots: wlr_xdg_surface_get_geometry remove MR 4788
Consolatis [Wed, 27 Nov 2024 03:14:08 +0000 (04:14 +0100)]
chase wlroots: wlr_xdg_surface_get_geometry remove MR 4788

Ref: 5c98d1a04a1439bf40c6e516086cfaff2d67f135
("xdg-surface: fix window geometry handling")

9 months agochase wlroots: let scene restack xwayland surfaces (MR 4756)
tokyo4j [Mon, 19 May 2025 06:03:41 +0000 (15:03 +0900)]
chase wlroots: let scene restack xwayland surfaces (MR 4756)

Ref: 1133bc15ceb2c2bcb6df692acda6bfa39a292ab5
("Transparently restack xwayland surfaces")

In addition, MR 4772 makes sure the hidden windows are stacked at the
bottom, just like what we did with XWAYLAND_VIEW_HIDDEN.

9 months agochase wlroots: xwayland separate maximized axis MR 4670
Consolatis [Wed, 27 Nov 2024 02:53:28 +0000 (03:53 +0100)]
chase wlroots: xwayland separate maximized axis MR 4670

Ref: ceb4fcedca30d323a05836b0872bfe773a047ccc
("xwm: expose individual axis for _set_maximized()")

9 months agochase wlroots: _wants_focus and input_model renames MR 2434
Consolatis [Wed, 27 Nov 2024 02:41:58 +0000 (03:41 +0100)]
chase wlroots: _wants_focus and input_model renames MR 2434

Ref: d3b7e040af46ab03114d5a40e9ed0c7c6aff15be
("wlr_xwayland_surface: fix prefix of two functions")

9 months agochase wlroots: wlr_surface_accepts args MR 2434
Consolatis [Wed, 27 Nov 2024 02:35:45 +0000 (03:35 +0100)]
chase wlroots: wlr_surface_accepts args MR 2434

Ref: 5ecbd23c1d44119cb32b345782d50c9664853109
("wlr_surface: fix argument order consistency")

9 months agochase wlroots: pin to first 0.19.0-dev commit
John Lindgren [Sun, 2 Feb 2025 19:22:24 +0000 (14:22 -0500)]
chase wlroots: pin to first 0.19.0-dev commit

Ref: b10516e1e8352f3140d68fa580b0ed32e13c2d58
("build: bump version to 0.19.0-dev")

9 months agoCI: Void: use wlroots0.19-devel distro package
Consolatis [Sat, 17 May 2025 18:37:32 +0000 (20:37 +0200)]
CI: Void: use wlroots0.19-devel distro package

9 months agoCI: allow Debian to build the wlroots subproject
Consolatis [Sat, 17 May 2025 18:32:10 +0000 (20:32 +0200)]
CI: allow Debian to build the wlroots subproject

9 months agoscaled-scene-buffer: guard against negative sizes
tokyo4j [Sat, 17 May 2025 15:07:48 +0000 (00:07 +0900)]
scaled-scene-buffer: guard against negative sizes

9 months agographic-helper: properly handle very small multi_rects
tokyo4j [Sun, 4 May 2025 14:40:25 +0000 (23:40 +0900)]
graphic-helper: properly handle very small multi_rects

For example, alacritty can be resized to 1x1 and the size of the
scene-rects inside the multi_rect for the window switcher preview could
be negative.

9 months agossd: guard against negative sizes
tokyo4j [Sun, 4 May 2025 13:33:12 +0000 (22:33 +0900)]
ssd: guard against negative sizes

We always create a SSD for 0x0 window since decorations are usually
requested before a window is mapped. Thus the sizes of some buffers/rects
like edge shadows could be negative, which is asserted in wlroots 0.19.

9 months agoosd: guard against negative sizes
tokyo4j [Mon, 14 Apr 2025 11:55:45 +0000 (20:55 +0900)]
osd: guard against negative sizes

This fixes the broken look of osd with very small width like:

  osd.window-switcher.width: 1

9 months agomenu: guard against negative sizes
tokyo4j [Sat, 3 May 2025 10:57:49 +0000 (19:57 +0900)]
menu: guard against negative sizes

For example, the size of a scene_rect for a menu item background could be
negative with:

  menu.width.max: 0
  menu.width.min: 0

9 months agoxwayland.c: support both axis for client side maximize requests
Consolatis [Wed, 27 Nov 2024 06:39:30 +0000 (07:39 +0100)]
xwayland.c: support both axis for client side maximize requests

9 months agokeyboard.c: don't broadcast modifiers from virtual keyboards
Orfeas [Thu, 15 May 2025 21:30:24 +0000 (00:30 +0300)]
keyboard.c: don't broadcast modifiers from virtual keyboards

Fixes: #2723
9 months agoCI: verify early exit on missing fonts
Consolatis [Fri, 9 May 2025 13:51:31 +0000 (15:51 +0200)]
CI: verify early exit on missing fonts

9 months agoGracefully exit when no fonts are installed
tokyo4j [Thu, 8 May 2025 10:28:15 +0000 (19:28 +0900)]
Gracefully exit when no fonts are installed

...rather than emitting ugly errors like:

labwc: ../src/buffer.c:85: buffer_adopt_cairo_surface: Assertion
`cairo_image_surface_get_format(surface) == CAIRO_FORMAT_ARGB32' failed.

10 months agossd-shadow: flip top-right/bottom-left corner instead of rotating
tokyo4j [Sat, 3 May 2025 15:57:54 +0000 (00:57 +0900)]
ssd-shadow: flip top-right/bottom-left corner instead of rotating

This simplifies corner_scale_crop().

10 months agodocs: document scroll wheel emulation actions
Jens Peters [Fri, 25 Apr 2025 12:37:06 +0000 (14:37 +0200)]
docs: document scroll wheel emulation actions

10 months agocursor: add scroll emulation for cursor motion
Jens Peters [Fri, 25 Apr 2025 12:21:30 +0000 (14:21 +0200)]
cursor: add scroll emulation for cursor motion

10 months agocursor: introduce cursor_emulate_axis()
Jens Peters [Mon, 21 Apr 2025 16:18:21 +0000 (18:18 +0200)]
cursor: introduce cursor_emulate_axis()

10 months agoaction: add scroll-wheel-emulation actions
Jens Peters [Wed, 16 Apr 2025 17:16:06 +0000 (19:16 +0200)]
action: add scroll-wheel-emulation actions

10 months agorcxml: validate total osd field width
tokyo4j [Sat, 3 May 2025 11:58:39 +0000 (20:58 +0900)]
rcxml: validate total osd field width

Before this patch, window switcher fields could overflow if the sum of
<windowSwitcher><fields><field width=""> exceeds 100%.

10 months agocursor: relocate cursor_emulate functions
Jens Peters [Fri, 2 May 2025 12:19:08 +0000 (14:19 +0200)]
cursor: relocate cursor_emulate functions

10 months agocursor: remove unused parameter
Jens Peters [Wed, 16 Apr 2025 16:25:43 +0000 (18:25 +0200)]
cursor: remove unused parameter

This makes msec() also unused.

10 months agocursor: use CONNECT_SIGNAL macro
Jens Peters [Tue, 15 Apr 2025 19:43:00 +0000 (21:43 +0200)]
cursor: use CONNECT_SIGNAL macro

Rename functions accordingly.

10 months agobuild: bump version to 0.8.4
Johan Malm [Fri, 2 May 2025 15:01:34 +0000 (16:01 +0100)]
build: bump version to 0.8.4

10 months agoNEWS.md: update notes for 0.8.4
Johan Malm [Tue, 15 Apr 2025 19:16:25 +0000 (20:16 +0100)]
NEWS.md: update notes for 0.8.4

10 months agoTranslation updates from weblate
Weblate [Fri, 2 May 2025 13:26:02 +0000 (15:26 +0200)]
Translation updates from weblate

Co-authored-by: Syahmin Sukhairi <kuimax@yahoo.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/id/
Translation: Labwc/labwc

10 months agoTranslation updates from weblate
Weblate [Wed, 30 Apr 2025 08:01:24 +0000 (10:01 +0200)]
Translation updates from weblate

Co-authored-by: knm100 <ckdeneon@163.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/zh_CN/
Translation: Labwc/labwc

10 months agoParse touch configs in reverse order to enable overriding
Simon Long [Tue, 29 Apr 2025 08:18:17 +0000 (09:18 +0100)]
Parse touch configs in reverse order to enable overriding

Also reverse searching of default configs

10 months agofont: use PangoStyle enum
Johan Malm [Wed, 23 Apr 2025 19:03:14 +0000 (20:03 +0100)]
font: use PangoStyle enum

10 months agofont: use PangoWeight enum
Johan Malm [Wed, 23 Apr 2025 19:01:26 +0000 (20:01 +0100)]
font: use PangoWeight enum

No change in functionality.

Suggested-by: @spl237
10 months agoview: handle initially minimized views (minimal fix)
John Lindgren [Wed, 23 Apr 2025 16:03:20 +0000 (12:03 -0400)]
view: handle initially minimized views (minimal fix)

The view->impl functions do not directly support mapping a view while
minimized. Instead, mark it as not minimized, map it, and then minimize
it again.

Fixes: #2627
10 months agodocs: list all supported font weights
Consolatis [Wed, 23 Apr 2025 16:12:59 +0000 (18:12 +0200)]
docs: list all supported font weights

10 months agoAdd support for all Pango font weight options
Simon Long [Wed, 23 Apr 2025 16:03:02 +0000 (17:03 +0100)]
Add support for all Pango font weight options

10 months agoosd: suppress errors with null window switcher fields
tokyo4j [Tue, 22 Apr 2025 19:27:19 +0000 (04:27 +0900)]
osd: suppress errors with null window switcher fields

Fixes a regression in 75eb370 that emits errors like:

[../labwc/src/common/scaled-font-buffer.c:26] font_buffer_create() failed

...when osd_field_get_content() doesn't set non-null text.

10 months agolabwc-config(5): add mousebind direction example
Johan Malm [Fri, 18 Apr 2025 13:39:46 +0000 (14:39 +0100)]
labwc-config(5): add mousebind direction example

Helped-by: @Consolatis
Related-to: #2677
10 months agodocs: rc.xml.all: Fix reference to labwc-config manpage. Unwefify.
Tomi Ollila [Thu, 17 Apr 2025 19:54:15 +0000 (22:54 +0300)]
docs: rc.xml.all: Fix reference to labwc-config manpage. Unwefify.

There is no "labwc" manpage in section 5 (man 5 labwc may fail or
show e.g. labwc-action manpage).

Replaced one 'we' with passive form, to match the common style in docs/.

10 months agomenu: refactor handle_menu_element() (part 2)
tokyo4j [Mon, 14 Apr 2025 09:57:36 +0000 (18:57 +0900)]
menu: refactor handle_menu_element() (part 2)

I believe !current_menu is equivalent to
is_toplevel_static_menu_definition().

10 months agolabwc-menu(5): fix incorrect statement on label attribute
Johan Malm [Wed, 16 Apr 2025 19:21:22 +0000 (20:21 +0100)]
labwc-menu(5): fix incorrect statement on label attribute

10 months agokeyboard: remove code duplication
Johan Malm [Wed, 16 Apr 2025 19:15:14 +0000 (20:15 +0100)]
keyboard: remove code duplication

10 months agomenu: refactor handle_menu_element() (part 1)
tokyo4j [Mon, 14 Apr 2025 07:23:02 +0000 (16:23 +0900)]
menu: refactor handle_menu_element() (part 1)

Also, show an error message when <menu> without 'id' is encountered

10 months agoosd: add osd.workspace-switcher.boxes.border.width
Dmitry [Sun, 6 Apr 2025 11:05:04 +0000 (15:05 +0400)]
osd: add osd.workspace-switcher.boxes.border.width

10 months agoosd: fix boxes size and alignment in workspace switcher
Dmitry [Sun, 6 Apr 2025 10:49:11 +0000 (14:49 +0400)]
osd: fix boxes size and alignment in workspace switcher

Workspace switcher boxes height was 2px more than supposed,
e.g. theme defaults of 20x20 resulted in 20x22 boxes.

The middle of the boxes list was also 1px to the left of the middle
of the osd window.

10 months agorcxml: fix broken OSD layout with multiple <fields> entries
tokyo4j [Sat, 12 Apr 2025 11:51:02 +0000 (20:51 +0900)]
rcxml: fix broken OSD layout with multiple <fields> entries

Before this commit, all <field> entries inside different <fields> entires
were inserted to the same list. Suppose we have following configuration:

  <windowSwitcher>
    <fields><field content="title" width="100%" /></fields>
  </windowSwitcher>
  <windowSwitcher>
    <fields><field content="identifier" width="100%" /></fields>
  </windowSwitcher>

In this case, both two <field> entries were inserted to
rc.window_switcher.fields, making the OSD content overflow.

This commit fixes by clearing rc.window_switcher.fields when the parser
encounters <windowSwitcher><fields>.

10 months agorcxml: fix broken titlebar layout with multiple <layout> entries
tokyo4j [Sat, 12 Apr 2025 11:31:04 +0000 (20:31 +0900)]
rcxml: fix broken titlebar layout with multiple <layout> entries

Before this commit, when we have multiple <theme><titlebar><layout>
entries like below, duplicated button types can be inserted to
rc.title_buttons_{left,right} and the button could go outside of the
window:
    <theme>
      <titlebar><layout>icon:iconify,max,close</layout></titlebar>
      <titlebar><layout>icon:iconify,max,close</layout></titlebar>
    </theme>

This commit fixes by clearing those lists when the parser encounters
<theme><titlebar><layout>.

10 months agoTranslation updates from weblate
Weblate [Tue, 8 Apr 2025 05:25:52 +0000 (07:25 +0200)]
Translation updates from weblate

Co-authored-by: Qayyum Yazid <purrnama@proton.me>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ms/
Translation: Labwc/labwc

11 months agoosd: update the default window switcher layout
tokyo4j [Mon, 31 Mar 2025 03:20:30 +0000 (12:20 +0900)]
osd: update the default window switcher layout

The default window switcher layout is updated from:

  <windowSwitcher>
    <fields>
      <field content="type" width="25%" />
      <field content="trimmed_identifier" width="25%" />
      <field content="title" width="50%" />
    </fields>
  </windowSwitcher>

to:

  <windowSwitcher>
    <fields>
      <field content="icon" width="5%" />
      <field content="desktop_entry_name" width="30%" />
      <field content="title" width="65%" />
    </fields>
  </windowSwitcher>

Only desktop entry name and title are shown when libsfdo is not linked.

11 months agodesktop-entry: localize application names
tokyo4j [Wed, 2 Apr 2025 17:19:04 +0000 (02:19 +0900)]
desktop-entry: localize application names

This commit localizes application names in the window switcher set via
'desktop_entry_name' or '%n' specifier.

11 months agocursor: let followMouse update focus only when cursor enters a surface
tokyo4j [Tue, 1 Apr 2025 12:32:31 +0000 (21:32 +0900)]
cursor: let followMouse update focus only when cursor enters a surface

Before this patch, when followMouse and followMouseRequiresMovement are
both yes, we set the keyboard focus when the cursor moves within an
unfocused surface. However, kwin, xfwm4 and openbox all set keyboard focus
only when the cursor enters a surface.

11 months agoosd: add osd.window-switcher.item.icon.size
tokyo4j [Tue, 1 Apr 2025 07:53:15 +0000 (16:53 +0900)]
osd: add osd.window-switcher.item.icon.size

This allows users to make the icon in window switcher bigger (or smaller)
than the font size, which enables more Openbox-like appearance.

Example configuration:
  osd.window-switcher.item.icon.size: 50

This commit also makes the icon smaller than the font size if the width
allocated with <windowSwitcher><fields><field width=""> is smaller than
that.

11 months agoosd: consider item.padding.y when centoring workspace name
tokyo4j [Tue, 1 Apr 2025 05:06:45 +0000 (14:06 +0900)]
osd: consider item.padding.y when centoring workspace name

11 months agoxwayland: notify correct window stacking order to xwayland
tokyo4j [Tue, 25 Mar 2025 07:01:54 +0000 (16:01 +0900)]
xwayland: notify correct window stacking order to xwayland

Before this commit, when a normal window is raised, xwayland thought it's
above always-on-top (AOT) windows even though it's actually below AOT
windows in the scene. This means mouse scroll events may be unexpectedly
sent to normal windows below AOT windows even when the cursor is hovering
over a AOT window.

So this commit fixes it by notifying the correct stacking order (where AOT
windows are placed above normal windows) to xwayland every time the
stacking order is updated.

Other benefits of this commit are:
- It makes the code more readable and predictable by aggregating logic
  about stacking order management in xwayland (e.g. shaded windows or
  windows in other workspaces should be notified to xwayland as being
  placed at the bottom).
- As server->last_raised_view is removed in the previous commit, we were
  notifying the stacking order to xwayland every time a window with dialog
  windows is clicked (not when clicking a topmost window without dialogs,
  due to some optimization in wlroots). This commit fixes this by caching
  the window stacking order in xwayland_view->stacking_order and notifying
  it to xwayland only when it's updated.

11 months agoview: remove server->last_raised_view
tokyo4j [Wed, 19 Mar 2025 00:54:20 +0000 (09:54 +0900)]
view: remove server->last_raised_view

We were skipping in view_move_to_front() if the raised view is already
cached as server->last_raised_view. But this was prone to bugs that
windows cannot be raised even though they are actually not placed at the
top in the scene.

This happened when a window is mapped but view_move_to_front() is not
called in view_impl_map() for some reason. Example cases were:
- a window is minimized before being mapped (#2627)
- a window is mapped while window switcher is active (#2629)

Also, this problem was the root cause of #1640 and #2582, though they are
already fixed.

Therefore, this commit removes server->last_raised_view. In order to
eliminate unnecessary communications between labwc and xwayland (ref:
db591d1), I'll introduce another caching mechanism in the next commit.

11 months agodocs: labwc-actions.5.scd style updates
Tomi Ollila [Mon, 31 Mar 2025 19:17:55 +0000 (22:17 +0300)]
docs: labwc-actions.5.scd style updates

- some newlines to dedent and separate content
- comma (,) before respectively
- reflowd some lines to fit in 80 columns

11 months agomagnifier: show magnifier only in one output
tokyo4j [Sun, 30 Mar 2025 07:09:39 +0000 (16:09 +0900)]
magnifier: show magnifier only in one output

This may slightly degrade UX, but this prevents the temporary buffer from
being reallocated for every frame when the magnifier spans multiple
outputs with different scales/transforms.

11 months agomagnifier: scale/transform the magnifier
tokyo4j [Sat, 15 Mar 2025 03:35:07 +0000 (12:35 +0900)]
magnifier: scale/transform the magnifier

Before this commit, the magnifier wasn't scaled, and caused visual
artifacts when the output is transformed.

11 months agosrc/magnifier: fix compile on ancient GCC versions
Consolatis [Sun, 30 Mar 2025 02:12:55 +0000 (04:12 +0200)]
src/magnifier: fix compile on ancient GCC versions

Fixes
```
../src/magnifier.c:153:3: error: missing initializer for field ‘clip’ of ‘struct wlr_render_rect_options’ [-Werror=missing-field-initializers]
  153 |   };
      |   ^
In file included from ../subprojects/wlroots/include/wlr/render/wlr_renderer.h:14,
                 from ../subprojects/wlroots/include/wlr/types/wlr_output.h:17,
                 from ../src/magnifier.c:5:
../subprojects/wlroots/include/wlr/render/pass.h:115:27: note: ‘clip’ declared here
  115 |  const pixman_region32_t *clip
```

11 months agoTranslation updates from weblate
Weblate [Sat, 29 Mar 2025 11:25:48 +0000 (12:25 +0100)]
Translation updates from weblate

Co-authored-by: Davidmp <opensusecatala@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ca/
Translation: Labwc/labwc

11 months agoTranslation updates from weblate
Weblate [Wed, 26 Mar 2025 10:25:47 +0000 (11:25 +0100)]
Translation updates from weblate

Co-authored-by: Hiroaki Yamamoto <hrak1529@gmail.com>
Co-authored-by: UTUMI Hirosi <utuhiro78@yahoo.co.jp>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ja/
Translation: Labwc/labwc

11 months agoaction: Add HideCursor action
Jens Peters [Sun, 23 Mar 2025 13:36:16 +0000 (14:36 +0100)]
action: Add HideCursor action

11 months agoosd: support app icons in window switcher
tokyo4j [Fri, 14 Mar 2025 10:33:28 +0000 (19:33 +0900)]
osd: support app icons in window switcher

Example configuration:

  <windowSwitcher>
    <fields>
      <field content="icon" width="5%" />
      <field content="title" width="95%" />
    </fields>
  </windowSwitcher>

11 months agostring-helpers: rtrim() with just char *s, call it later in string_strip
Tomi Ollila [Wed, 1 Jan 2025 19:26:57 +0000 (21:26 +0200)]
string-helpers: rtrim() with just char *s, call it later in string_strip

char **s not needed to get trailing whitespace trimmed,
and rtrim() does not return anything

if there is leading whitespace in *s in call to string_strip(),
there is less chars left to scan in rtrim().

11 months agoosd: draw window switcher with scene-nodes
tokyo4j [Fri, 14 Mar 2025 07:53:40 +0000 (16:53 +0900)]
osd: draw window switcher with scene-nodes

...rather than drawing it onto a single texture.

11 months agoosd: make osd_update() private
tokyo4j [Fri, 14 Mar 2025 07:53:18 +0000 (16:53 +0900)]
osd: make osd_update() private

11 months agoproject wide: clean up event listeners on shutdown (part 2)
tokyo4j [Thu, 13 Mar 2025 08:39:23 +0000 (17:39 +0900)]
project wide: clean up event listeners on shutdown (part 2)