Commit graph

2818 commits

Author SHA1 Message Date
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
Johan Malm
9ad6e3c68c NEWS.md: start converting section 0.8.0 references
...to [#%d] format and process with rip.c
2025-02-04 06:37:00 +00:00
Johan Malm
2e10fe6f41 Add scripts/rip.c
...to extract pull-request and issue reference from NEWS.md and output
them as GH URLs.
2025-02-04 06:37:00 +00:00
Orfeas
3e9c08871f query: encapsulate parser state into a struct 2025-02-03 20:00:22 +00:00
Consolatis
ed4553fc7e src/menu: add global config for menu.showIcons 2025-02-02 15:05:37 +00:00
Consolatis
1fa4070025 src/menu: add support for scalable menu icons 2025-02-02 15:05:37 +00:00
Consolatis
060b59f7ed src/config: let icon theme name default to theme 2025-02-02 15:05:37 +00:00
Consolatis
1e2c709d6b docs/labwc-menu: we only support a single menu.xml file 2025-02-02 15:05:37 +00:00
01micko
6efdb1037f README.md: fix minor grammar error, add libsfdo as optional dependency 2025-02-01 12:36:56 +01:00
tokyo4j
9a473f1848 wlr-foreign: send output_enter on initialization
This fixes a bug that output_enter events are not sent when a Slack
window running in background is re-mapped, which caused missing taskbar
items in Waybar when it's configured to show windows per output.
2025-01-27 13:18:29 +01:00
Consolatis
01592d2633 surface-helpers: reduce log spam
This shows up when processing out-of-surface movement on subsurfaces.
2025-01-26 14:22:06 +01:00
Consolatis
37d745b01d cursor.c: use subsurface as reference for out-of-surface movement
The protocol states that the wl_pointer motion coordinates must be
relative to the focused surface (e.g. the surface that last received
a wl_pointer enter event).

Before this patch, the coordinates were relative to the toplevel
surface instead, resulting in subsurface events having the wrong
coordinates when pressing a button over a subsurface and moving
the cursor outside of that subsurface.

Fixes: #2542
2025-01-26 14:22:06 +01:00
tokyo4j
26064fb8f6 Add <theme><fallbackAppIcon>
This commit adds <theme><fallbackAppIcon> that configures the icon name
to be used when lookups for an application icon is failed. Its default
value is set as 'labwc' which shows our labwc logo.
2025-01-26 11:46:32 +01:00
tokyo4j
dc474521ab ssd: dynamically look up window icons in titlebar for output scales
by introducing scaled_icon_buffer.
2025-01-26 11:46:32 +01:00
tokyo4j
5e29f79258 string-helpers: add str_equal() 2025-01-25 07:27:21 +09:00
tokyo4j
45f73b58a1 img: remove padding_x from lab_img_render()
padding_x in lab_img_render() was just to make sure window icons in the
titlebar doesn't get too close to adjacent buttons and it didn't felt
clean. To remove it from lab_img, this commit changes the size of window
icon buffers from (window.button.width)x(window.button.height) to
(window.button.width * 0.8)x(window.button.height) and horizontally
slide it by (window.button.width * 0.1) to keep the horizontal padding.

Note that the size of the hitbox for a window icon is kept the same and
nothing is changed from user's perspective.
2025-01-25 07:27:21 +09:00
tokyo4j
a0cf6bb068 Move "#if HAVE_LIBSFDO" inside desktop-entry.h 2025-01-25 07:27:21 +09:00
tokyo4j
bffdccf8dc refactor: add LAB_BS_DEFAULT in lab_button_state 2025-01-25 07:27:21 +09:00
Dima Krasner
36d6e9ef75 docs: fix incorrect default for window.label.text.justify 2025-01-24 12:57:06 +01:00
tokyo4j
4b7c502ace view: replace content_node with content_tree 2025-01-22 18:02:54 +01:00
tokyo4j
40b1f5407f ssd: fix InactiveWindow font not working 2025-01-22 17:54:48 +01:00
yuiiio
baab35c469 ime: cleanup new_popup_surface listener when destroy 2025-01-19 08:00:45 +09:00
yuiiio
f4d581ef91 xdg: cleanup request_show_window_menu listener when destroy 2025-01-16 00:08:56 +01:00
tokyo4j
08d31145fd cursor: don't leak bound scroll events from touchpad to clients
Prior to this commit, when we receive fine-grained scroll events from
touchpads that are bound to any mousebind, we leaked the scroll events to
the client unless the accumulated scroll delta exceeds the fixed threshold.
This was annoying for example when a user wants to ZoomIn/Out with
W-Up/Down mousebinds with a touchpad.

So this commit fixes it by not leaking the scroll events nor executing
actions when the accumulated delta doesn't exceed the threshold.
2025-01-14 09:35:07 +09:00
tokyo4j
1a6b01a83e rcxml: replace 'icon' with 'menu' when libsfdo is not linked 2025-01-14 08:41:00 +09:00
tokyo4j
f082dd7c25 rcxml: ignore duplicated buttons in <titlebar><layout>
...rather than ignoring the whole <titlebar><layout>.
2025-01-14 08:41:00 +09:00