]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
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)

11 months agodata: center logo vertically
John Lindgren [Thu, 13 Mar 2025 15:49:19 +0000 (11:49 -0400)]
data: center logo vertically

The current logo has asymmetrical 62/19 px top/bottom padding. Let's
center it (40/41 px top/bottom) so it looks better in the titlebar.

11 months agoproject wide: clean up event listeners on shutdown
Consolatis [Sat, 8 Feb 2025 14:48:50 +0000 (15:48 +0100)]
project wide: clean up event listeners on shutdown

This ensures all event listeners are removed before the emitting
wlroots object is being destroyed. This will be enforced with asserts
in wlroots 0.19 but there is no reason to not do it right now either.

This change in wlroots 0.19 is implemented via commit
8f56f7ca43257cc05c7c4eb57a0f541e05cf9a79
"Assert (almost all) signals have no attached listeners on destroy"

11 months agoMerge pull request #2598 from tokyo4j/refactor-magnifier
Hiroaki Yamamoto [Thu, 13 Mar 2025 06:20:34 +0000 (15:20 +0900)]
Merge pull request #2598 from tokyo4j/refactor-magnifier

magnifier: refactor

11 months agomenu: show app icons in client-list-combined-menu
tokyo4j [Tue, 11 Mar 2025 19:04:50 +0000 (04:04 +0900)]
menu: show app icons in client-list-combined-menu

11 months agomenu: dynamically generate top-level pipemenus
tokyo4j [Mon, 10 Mar 2025 07:52:52 +0000 (16:52 +0900)]
menu: dynamically generate top-level pipemenus

This eliminates code duplications and aligns the behavior of top-level
pipemenus with sub-pipemenus.

11 months agomenu: don't fill default items in empty menus
tokyo4j [Mon, 10 Mar 2025 07:49:35 +0000 (16:49 +0900)]
menu: don't fill default items in empty menus

This is needed to prevent pipemenus which usually contains no items
from being filled with default items in follow-up commits.

11 months agomenu: use item->parent->id for client-list-combined-menu
tokyo4j [Mon, 10 Mar 2025 07:26:46 +0000 (16:26 +0900)]
menu: use item->parent->id for client-list-combined-menu

...instead of item->id.

11 months agomenu: lazily generate menu scenes
tokyo4j [Sun, 9 Mar 2025 15:00:39 +0000 (00:00 +0900)]
menu: lazily generate menu scenes

This removes the need to call update_client_list_combined_menu()
and update_client_send_to_menu() every time a root menu is opened.

This commit also fixed the incorrect menu position with following
configuration:
  <menu id="foo" label="foo">
    <item label="aaaaaa"/>
    <item label="bbbbbb"/>
  </menu>
  <menu id="root-menu">
    <menu id="foo" />
    <menu id="foo" />
  </menu>

11 months agomenu: assert server->menu_current != NULL in menu_close_root()
tokyo4j [Sun, 9 Mar 2025 15:00:19 +0000 (00:00 +0900)]
menu: assert server->menu_current != NULL in menu_close_root()

11 months agomenu: s/menu_configure/menu_reposition/
tokyo4j [Sun, 9 Mar 2025 14:57:58 +0000 (23:57 +0900)]
menu: s/menu_configure/menu_reposition/

11 months agomenu: remove menu_free_from()
tokyo4j [Sun, 9 Mar 2025 14:54:56 +0000 (23:54 +0900)]
menu: remove menu_free_from()

11 months agoaction: allow only Previous/NextWindow action while window switching
tokyo4j [Sun, 9 Mar 2025 16:56:09 +0000 (01:56 +0900)]
action: allow only Previous/NextWindow action while window switching

This commit prevents some actions like SendToDesktop from being executed
while window switching, which may mess up our scene-graph.

11 months agodesktop: harden window stacking order while window switching
tokyo4j [Mon, 24 Feb 2025 12:40:46 +0000 (21:40 +0900)]
desktop: harden window stacking order while window switching

This commit moves the check against server->input_mode from the callers
of desktop_focus_view() into desktop_focus_view() itself. This
eliminates code duplications and makes it harder to mess up the window
stacking order while window switching.

I also added the same check in view_minimize() so that minimize requests
from panels never messes up the window stacking order (I think only this
should be described in the release note).

11 months agoosd: don't update cursor while window switching
tokyo4j [Sat, 22 Feb 2025 11:38:59 +0000 (20:38 +0900)]
osd: don't update cursor while window switching

cursor_update_focus() is no-op while server->input_mode is set. So we
should only call cursor_update_focus() at the beginning/end of window
switching.

11 months agoconfig: honor no content <desktops><prefix> node
Johan Malm [Fri, 28 Feb 2025 16:01:07 +0000 (16:01 +0000)]
config: honor no content <desktops><prefix> node

...because users need a way to override the default "Workspace".

Fixes: #2601
11 months agoconfig: increase default <snapping><range> to 10
Johan Malm [Tue, 4 Mar 2025 21:14:41 +0000 (21:14 +0000)]
config: increase default <snapping><range> to 10

...to make it easier to snap windows on the edge between two monitors.

Fixes: #2602
12 months agocall selected actions with keypad enter
zeussuse [Thu, 6 Mar 2025 21:00:50 +0000 (21:00 +0000)]
call selected actions with keypad enter

12 months agoREADME.md: add link to release video
Johan Malm [Mon, 3 Mar 2025 21:36:22 +0000 (21:36 +0000)]
README.md: add link to release video

12 months agomagnifier: refactor magnifier_draw()
tokyo4j [Sat, 22 Feb 2025 09:13:11 +0000 (18:13 +0900)]
magnifier: refactor magnifier_draw()

12 months agossd-titlebar: show fallback icon when no app_id is set
tokyo4j [Sun, 23 Feb 2025 17:22:30 +0000 (02:22 +0900)]
ssd-titlebar: show fallback icon when no app_id is set

Before this commit, nothing was rendered in window icon button if the
application doesn't set its app_id (e.g. nested kwin_wayland). This was my
oversight in dc474521.

This commit makes sure fallback icon (set via <theme><fallbackAppIcon>)
by removing ssd->state.app_id and the early-return in
ssd_update_window_icon(). This doesn't affect performance because
scaled_icon_buffer caches app_id and scaled_icon_buffer_set_app_id() does
nothing when a duplicated app_id is passed.

12 months agomagnifier: make sure magnifier scale is bigger than 1.0
tokyo4j [Sun, 23 Feb 2025 05:05:45 +0000 (14:05 +0900)]
magnifier: make sure magnifier scale is bigger than 1.0

12 months agomagnifier: use wlr_output.swapchain.format
tokyo4j [Sat, 22 Feb 2025 08:33:48 +0000 (17:33 +0900)]
magnifier: use wlr_output.swapchain.format

12 months agomagnifier: rename some functions
tokyo4j [Sat, 22 Feb 2025 06:21:32 +0000 (15:21 +0900)]
magnifier: rename some functions

12 months agobox: add box_to_fbox()
tokyo4j [Sat, 22 Feb 2025 06:20:53 +0000 (15:20 +0900)]
box: add box_to_fbox()

12 months agoCI: chase wlroots package rename on FreeBSD
Jan Beich [Thu, 20 Feb 2025 01:12:03 +0000 (02:12 +0100)]
CI: chase wlroots package rename on FreeBSD

https://github.com/freebsd/freebsd-ports/commit/2cb7175c921d

12 months agobuild: bump version to 0.8.3
Johan Malm [Fri, 21 Feb 2025 20:20:45 +0000 (20:20 +0000)]
build: bump version to 0.8.3

12 months agoNEWS.md: fix minor grammatical error
Johan Malm [Fri, 21 Feb 2025 20:08:59 +0000 (20:08 +0000)]
NEWS.md: fix minor grammatical error

12 months agoNEWS.md: update notes for 0.8.3
Johan Malm [Fri, 21 Feb 2025 19:57:12 +0000 (19:57 +0000)]
NEWS.md: update notes for 0.8.3

12 months agoNEWS.md convert refs to [#%d] format
Johan Malm [Tue, 18 Feb 2025 21:50:46 +0000 (21:50 +0000)]
NEWS.md convert refs to [#%d] format

12 months agoNEWS.md: interim update
Johan Malm [Tue, 4 Feb 2025 06:43:23 +0000 (06:43 +0000)]
NEWS.md: interim update

12 months agocursor: don't un-minimize previewed window while window switching
tokyo4j [Mon, 17 Feb 2025 14:47:07 +0000 (23:47 +0900)]
cursor: don't un-minimize previewed window while window switching

This commit restores the check removed in 7a6ecca.

Without the check, if followMouse="yes" and
followMouseRequiresMovement="no", osd_update() => cursor_update_focus() =>
desktop_focus_view() unexpectedly un-minimizes the window on cursor even
when the window is just a preview of window switcher. This caused some
strange behavior that a minimized window selected with window switcher is
immediately hidden after finishing window switching.

12 months agoosd: prevent preview outlines from overlapping OSD in first output
tokyo4j [Sun, 16 Feb 2025 16:50:55 +0000 (01:50 +0900)]
osd: prevent preview outlines from overlapping OSD in first output

Following code didn't consider multi-monitor setup:

  wlr_scene_node_raise_to_top(&server->menu_tree->node);
  wlr_scene_node_raise_to_top(&output->osd_tree->node);

...because when executed twice, server->menu_tree is raised above
output->osd_tree for the first output. This resulted in a scene tree like
(higher to lower):

- output->osd_tree (for 2nd output)
- output->server->osd_state.preview_outline (placed just above menu_tree)
- sever->menu_tree
- output->osd_tree (for 1st output)

So the previous outline for window switcher is placed above the OSD in the
first output.

12 months agooutput: early return on wlopm if requested state is already set
Consolatis [Thu, 13 Feb 2025 15:28:17 +0000 (16:28 +0100)]
output: early return on wlopm if requested state is already set

This prevents a unnecessary output commit without buffer,
showing up as black flash when repeatedly calling wlopm --on.

12 months agooutput: set custom output mode on wlopm --on
Consolatis [Wed, 12 Feb 2025 16:04:13 +0000 (17:04 +0100)]
output: set custom output mode on wlopm --on

This works around a wlroots issue:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3946

Fixes: #2576
12 months agosrc/layers: handle unmap without any outputs left
Consolatis [Wed, 12 Feb 2025 14:14:16 +0000 (15:14 +0100)]
src/layers: handle unmap without any outputs left

12 months agosrc/overlay.c: clean up timer on exit
Consolatis [Mon, 10 Feb 2025 23:39:36 +0000 (00:39 +0100)]
src/overlay.c: clean up timer on exit

12 months agodocs: labwc-config.5.scd: dedent windowSwitcher content lists
Tomi Ollila [Tue, 11 Feb 2025 06:14:07 +0000 (08:14 +0200)]
docs: labwc-config.5.scd: dedent windowSwitcher content lists

fits better on 80-column terminal and is more consistent in style

12 months agodocs: trailing space, 1 tab to spaces, labwc-theme.5.scd to fit 80 cols
Tomi Ollila [Sat, 8 Feb 2025 14:26:47 +0000 (16:26 +0200)]
docs: trailing space, 1 tab to spaces, labwc-theme.5.scd to fit 80 cols

12 months agoCI: fix Debian build, wlroots package got renamed
Consolatis [Fri, 7 Feb 2025 17:01:27 +0000 (18:01 +0100)]
CI: fix Debian build, wlroots package got renamed

Also disable it for now because we can just use the shipped version
of libwlroots-0.18-dev rather than needing to build it ourselves.

12 months agomenu: remove ShowMenu action from menu items
tokyo4j [Fri, 7 Feb 2025 16:32:35 +0000 (01:32 +0900)]
menu: remove ShowMenu action from menu items

Previous commits fixed some unexpected behaviors when ShowMenu action is
executed from menu items, but that was still prone to bugs because when
calling actions_run(), we allow an inconsistent state where all menus are
closed but pipemenus must not be destroyed.

So this commit simply removes ShowMenu actions from menu items on
initialization.

12 months agomenu: assert no menu is opened in menu_open_root()
tokyo4j [Sat, 18 Jan 2025 04:09:47 +0000 (13:09 +0900)]
menu: assert no menu is opened in menu_open_root()

66a3beb added an early-return when the menu is opened, so we can guarantee
that no menu is opened there.

12 months agomenu: fix unexpected behavior when a menu is opened from another menu
tokyo4j [Fri, 24 Jan 2025 00:57:17 +0000 (09:57 +0900)]
menu: fix unexpected behavior when a menu is opened from another menu

server->menu_current should be cleared before calling actions_run() as
it may internally call menu_open_root(). Clearing it after actions_run()
leads to an inconsistent state where a menu is opened but
server->menu_current is NULL. It even lead to a segfault when the item
opening another menu is contained in a pipemenu, because
menu_open_root() calls destroy_pipemenu() when server->menu_current is
set, which makes accessing item->actions a UAF.

13 months agoTranslation updates from weblate
Weblate [Tue, 4 Feb 2025 21:01:18 +0000 (22:01 +0100)]
Translation updates from weblate

Co-authored-by: EggSupernova <leomelo34@protonmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pt_BR/
Translation: Labwc/labwc

13 months agoREADME.md#Integration: add xfce4-panel
01micko [Wed, 5 Feb 2025 11:23:35 +0000 (21:23 +1000)]
README.md#Integration: add xfce4-panel

inspired by https://forums.bunsenlabs.org/viewtopic.php?pid=141053#p141053

13 months agodocs/rc.xml.all: correct description of resize.cornerRange
Andrew J. Hesford [Tue, 4 Feb 2025 23:44:08 +0000 (18:44 -0500)]
docs/rc.xml.all: correct description of resize.cornerRange

13 months agossd: make sizes of invisible SSD extents configurable
Andrew J. Hesford [Fri, 17 Jan 2025 16:07:07 +0000 (11:07 -0500)]
ssd: make sizes of invisible SSD extents configurable

13 months agoCI: restrict build jobs to code changes
Consolatis [Tue, 4 Feb 2025 21:10:59 +0000 (22:10 +0100)]
CI: restrict build jobs to code changes

13 months agoaction.c: add SSD margin to MoveTo coordinates
Consolatis [Tue, 4 Feb 2025 20:47:24 +0000 (21:47 +0100)]
action.c: add SSD margin to MoveTo coordinates

Fixes: #2469
13 months agoserver: on exit, destroy backends first
Consolatis [Tue, 4 Feb 2025 14:09:45 +0000 (15:09 +0100)]
server: on exit, destroy backends first

This fixes a UAF caused by trying to update the xcursor in a
output destroy handler, in turn caused by destroying the backend.

Fixes: #2539
13 months agossd: fix resizing on border corners and add <resize><cornerRange>
tokyo4j [Sat, 1 Feb 2025 05:51:47 +0000 (14:51 +0900)]
ssd: fix resizing on border corners and add <resize><cornerRange>

Eliminate corner extents and instead use cursor position to map SSD
borders and extents to corner contexts, with a size configurable by the
<resize><cornerRange> parameter. This simplifies extent handling,
eliminates bugs in the detection of corner context, and allows users to
expand corner targets if they wish.

Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
13 months agoNEWS.md: start converting section 0.8.0 references
Johan Malm [Mon, 3 Feb 2025 20:16:21 +0000 (20:16 +0000)]
NEWS.md: start converting section 0.8.0 references

...to [#%d] format and process with rip.c

13 months agoAdd scripts/rip.c
Johan Malm [Mon, 3 Feb 2025 20:14:07 +0000 (20:14 +0000)]
Add scripts/rip.c

...to extract pull-request and issue reference from NEWS.md and output
them as GH URLs.

13 months agoquery: encapsulate parser state into a struct
Orfeas [Sun, 12 Jan 2025 11:43:39 +0000 (13:43 +0200)]
query: encapsulate parser state into a struct

13 months agosrc/menu: add global config for menu.showIcons
Consolatis [Mon, 27 Jan 2025 16:19:20 +0000 (17:19 +0100)]
src/menu: add global config for menu.showIcons

13 months agosrc/menu: add support for scalable menu icons
Consolatis [Mon, 6 Jan 2025 06:34:16 +0000 (07:34 +0100)]
src/menu: add support for scalable menu icons

13 months agosrc/config: let icon theme name default to theme
Consolatis [Wed, 29 Jan 2025 11:25:41 +0000 (12:25 +0100)]
src/config: let icon theme name default to theme

13 months agodocs/labwc-menu: we only support a single menu.xml file
Consolatis [Mon, 27 Jan 2025 16:16:15 +0000 (17:16 +0100)]
docs/labwc-menu: we only support a single menu.xml file