Commit graph

3043 commits

Author SHA1 Message Date
John Lindgren
b8568c3258 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.
2025-03-13 20:01:53 +00:00
Consolatis
9e6aaa689a 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"
2025-03-13 17:33:51 +09:00
Hiroaki Yamamoto
4750214d42
Merge pull request #2598 from tokyo4j/refactor-magnifier
magnifier: refactor
2025-03-13 15:20:34 +09:00
tokyo4j
e517b6808d menu: show app icons in client-list-combined-menu 2025-03-11 20:25:09 +00:00
tokyo4j
54186e5152 menu: dynamically generate top-level pipemenus
This eliminates code duplications and aligns the behavior of top-level
pipemenus with sub-pipemenus.
2025-03-10 19:42:03 +00:00
tokyo4j
40dfee7bd5 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.
2025-03-10 19:42:03 +00:00
tokyo4j
ea4ea84499 menu: use item->parent->id for client-list-combined-menu
...instead of item->id.
2025-03-10 19:42:03 +00:00
tokyo4j
12f95543f0 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>
2025-03-10 16:16:20 +09:00
tokyo4j
514f1d4fc4 menu: assert server->menu_current != NULL in menu_close_root() 2025-03-10 16:16:20 +09:00
tokyo4j
d7b5555bf8 menu: s/menu_configure/menu_reposition/ 2025-03-10 16:16:20 +09:00
tokyo4j
853d71ee6d menu: remove menu_free_from() 2025-03-10 16:16:20 +09:00
tokyo4j
7cc0c47923 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.
2025-03-09 20:41:26 +00:00
tokyo4j
270b45da88 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).
2025-03-09 20:41:26 +00:00
tokyo4j
cf759ec183 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.
2025-03-09 20:41:26 +00:00
Johan Malm
4eec0d2fc7 config: honor no content <desktops><prefix> node
...because users need a way to override the default "Workspace".

Fixes: #2601
2025-03-09 12:06:16 +09:00
Johan Malm
9ca0b111f4 config: increase default <snapping><range> to 10
...to make it easier to snap windows on the edge between two monitors.

Fixes: #2602
2025-03-08 22:36:53 +09:00
zeussuse
ba81866268 call selected actions with keypad enter 2025-03-06 21:42:05 +00:00
Johan Malm
9df7abdf38 README.md: add link to release video 2025-03-04 21:32:44 +00:00
tokyo4j
c9eaecb3ee magnifier: refactor magnifier_draw() 2025-02-24 18:59:57 +09:00
tokyo4j
392db7c04d 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.
2025-02-23 22:56:03 +01:00
tokyo4j
a40c779e59 magnifier: make sure magnifier scale is bigger than 1.0 2025-02-23 14:22:39 +09:00
tokyo4j
f9d6fcb1e4 magnifier: use wlr_output.swapchain.format 2025-02-23 14:17:35 +09:00
tokyo4j
b66c0d8797 magnifier: rename some functions 2025-02-23 14:17:31 +09:00
tokyo4j
cfbe54e67a box: add box_to_fbox() 2025-02-22 20:38:03 +09:00
Jan Beich
c1a27b139c CI: chase wlroots package rename on FreeBSD
2cb7175c92
2025-02-21 21:45:31 +01:00
Johan Malm
1fe4797a9d build: bump version to 0.8.3 2025-02-21 20:23:11 +00:00
Johan Malm
b5f10e9504 NEWS.md: fix minor grammatical error 2025-02-21 20:17:47 +00:00
Johan Malm
4ed868c7f0 NEWS.md: update notes for 0.8.3 2025-02-21 19:59:33 +00:00
Johan Malm
6d2f491a0a NEWS.md convert refs to [#%d] format 2025-02-20 20:44:40 +01:00
Johan Malm
6927153a83 NEWS.md: interim update 2025-02-17 21:07:42 +00:00
tokyo4j
a8cb8aad30 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.
2025-02-18 01:33:21 +09:00
tokyo4j
fa6bffa6c6 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.
2025-02-17 15:41:44 +00:00
Consolatis
bf02598098 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.
2025-02-13 20:45:18 +00:00
Consolatis
c0526d856d output: set custom output mode on wlopm --on
This works around a wlroots issue:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3946

Fixes: #2576
2025-02-13 14:19:50 +01:00
Consolatis
bb64dc81d6 src/layers: handle unmap without any outputs left 2025-02-12 15:38:18 +01:00
Consolatis
a4d1fcfef2 src/overlay.c: clean up timer on exit 2025-02-12 00:09:17 +09:00
Tomi Ollila
63da13a62b docs: labwc-config.5.scd: dedent windowSwitcher content lists
fits better on 80-column terminal and is more consistent in style
2025-02-11 15:35:06 +01:00
Tomi Ollila
92e4c5a606 docs: trailing space, 1 tab to spaces, labwc-theme.5.scd to fit 80 cols 2025-02-08 17:37:43 +01:00
Consolatis
0c5352d904 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.
2025-02-07 18:13:16 +01:00
tokyo4j
fb5e85f40f 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.
2025-02-07 17:58:55 +01:00
tokyo4j
8f5217c98b 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.
2025-02-07 17:58:55 +01:00
tokyo4j
4072a80eba 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.
2025-02-07 17:58:55 +01:00
Weblate
465488110d 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
2025-02-05 21:16:23 +00:00
01micko
9ed4058680 README.md#Integration: add xfce4-panel
inspired by https://forums.bunsenlabs.org/viewtopic.php?pid=141053#p141053
2025-02-05 15:23:17 +01:00
Andrew J. Hesford
b2623ce1e3 docs/rc.xml.all: correct description of resize.cornerRange 2025-02-04 18:55:31 -05:00
Andrew J. Hesford
6b9cc5dd64 ssd: make sizes of invisible SSD extents configurable 2025-02-04 18:55:31 -05:00
Consolatis
fa6e524412 CI: restrict build jobs to code changes 2025-02-04 22:36:52 +01:00
Consolatis
e47f9204b9 action.c: add SSD margin to MoveTo coordinates
Fixes: #2469
2025-02-04 21:56:40 +01:00
Consolatis
897799da5a 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
2025-02-04 19:56:36 +00:00
tokyo4j
950337b895 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>
2025-02-04 11:13:32 -05:00