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

12 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

13 months agoREADME.md: fix minor grammar error, add libsfdo as optional dependency
01micko [Sat, 1 Feb 2025 09:48:22 +0000 (19:48 +1000)]
README.md: fix minor grammar error, add libsfdo as optional dependency

13 months agowlr-foreign: send output_enter on initialization
tokyo4j [Mon, 27 Jan 2025 02:05:31 +0000 (11:05 +0900)]
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.

13 months agosurface-helpers: reduce log spam
Consolatis [Sat, 25 Jan 2025 21:14:50 +0000 (22:14 +0100)]
surface-helpers: reduce log spam

This shows up when processing out-of-surface movement on subsurfaces.

13 months agocursor.c: use subsurface as reference for out-of-surface movement
Consolatis [Sat, 25 Jan 2025 20:45:54 +0000 (21:45 +0100)]
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
13 months agoAdd <theme><fallbackAppIcon>
tokyo4j [Sun, 12 Jan 2025 07:52:37 +0000 (16:52 +0900)]
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.

13 months agossd: dynamically look up window icons in titlebar for output scales
tokyo4j [Sun, 12 Jan 2025 07:43:49 +0000 (16:43 +0900)]
ssd: dynamically look up window icons in titlebar for output scales

by introducing scaled_icon_buffer.

13 months agostring-helpers: add str_equal()
tokyo4j [Wed, 8 Jan 2025 06:07:06 +0000 (15:07 +0900)]
string-helpers: add str_equal()

13 months agoimg: remove padding_x from lab_img_render()
tokyo4j [Thu, 9 Jan 2025 08:20:08 +0000 (17:20 +0900)]
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.

13 months agoMove "#if HAVE_LIBSFDO" inside desktop-entry.h
tokyo4j [Sun, 12 Jan 2025 11:49:05 +0000 (20:49 +0900)]
Move "#if HAVE_LIBSFDO" inside desktop-entry.h

13 months agorefactor: add LAB_BS_DEFAULT in lab_button_state
tokyo4j [Mon, 13 Jan 2025 15:04:15 +0000 (00:04 +0900)]
refactor: add LAB_BS_DEFAULT in lab_button_state

13 months agodocs: fix incorrect default for window.label.text.justify
Dima Krasner [Fri, 24 Jan 2025 10:02:19 +0000 (12:02 +0200)]
docs: fix incorrect default for window.label.text.justify

13 months agoview: replace content_node with content_tree
tokyo4j [Sun, 19 Jan 2025 06:49:39 +0000 (15:49 +0900)]
view: replace content_node with content_tree

13 months agossd: fix InactiveWindow font not working
tokyo4j [Wed, 22 Jan 2025 11:56:29 +0000 (20:56 +0900)]
ssd: fix InactiveWindow font not working

13 months agoime: cleanup new_popup_surface listener when destroy
yuiiio [Sat, 18 Jan 2025 21:33:43 +0000 (06:33 +0900)]
ime: cleanup new_popup_surface listener when destroy

13 months agoxdg: cleanup request_show_window_menu listener when destroy
yuiiio [Wed, 15 Jan 2025 21:49:04 +0000 (06:49 +0900)]
xdg: cleanup request_show_window_menu listener when destroy

13 months agocursor: don't leak bound scroll events from touchpad to clients
tokyo4j [Sat, 11 Jan 2025 14:36:58 +0000 (23:36 +0900)]
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.

13 months agorcxml: replace 'icon' with 'menu' when libsfdo is not linked
tokyo4j [Sun, 12 Jan 2025 07:18:39 +0000 (16:18 +0900)]
rcxml: replace 'icon' with 'menu' when libsfdo is not linked

13 months agorcxml: ignore duplicated buttons in <titlebar><layout>
tokyo4j [Sun, 12 Jan 2025 07:16:16 +0000 (16:16 +0900)]
rcxml: ignore duplicated buttons in <titlebar><layout>

...rather than ignoring the whole <titlebar><layout>.

13 months agoscaled-scene-buffer: block sharing of buffers created before reconfigure
tokyo4j [Sun, 12 Jan 2025 09:18:28 +0000 (18:18 +0900)]
scaled-scene-buffer: block sharing of buffers created before reconfigure

This prevents potential bugs that buffers created by scaled_scene_buffers
before Reconfigure are reused by other newly created scaled_scene_buffers.

This is targeted for scaled_icon_buffer whose buffer creation depends on
server->sfdo.

13 months agoscaled-scene-buffer: store all the scaled_scene_buffers in a single list
tokyo4j [Sun, 12 Jan 2025 09:14:59 +0000 (18:14 +0900)]
scaled-scene-buffer: store all the scaled_scene_buffers in a single list

13 months agoseat: set repeat information for virtual keyboards
Consolatis [Fri, 10 Jan 2025 10:55:45 +0000 (11:55 +0100)]
seat: set repeat information for virtual keyboards

Fixes: #2513
13 months agokeyboard: add keyboard_get_all_modifiers()
Consolatis [Fri, 10 Jan 2025 10:02:58 +0000 (11:02 +0100)]
keyboard: add keyboard_get_all_modifiers()

And make mousebind handlers use that one.
Also remove keyboard_any_modifiers_pressed() and replace its usage
with the new function.

Without this patch we would only request the modifier state of the
keyboard group which makes mousebinds involving keyboard modifiers
break for virtual keyboards like when using wayvnc. Same story for
hiding the workspace overlay or snapping to regions.

Fixes: #2511
13 months agotheme: don't try to load "themerc"s if theme_name is NULL
Tomi Ollila [Tue, 7 Jan 2025 20:23:14 +0000 (22:23 +0200)]
theme: don't try to load "themerc"s if theme_name is NULL

theme_name is NULL when <theme><name></name>...</theme> is in rc.xml

13 months agoscaled-scene-buffer: use outputs_update signal
Consolatis [Thu, 9 Jan 2025 17:39:59 +0000 (18:39 +0100)]
scaled-scene-buffer: use outputs_update signal

This fixes an issue with buffers not updating when an output is configured
for a new scale. It also supports windows being on more than 2 outputs at
once and in general simplifies the code.

13 months agoFix typos
tinyboxvk [Thu, 9 Jan 2025 03:35:23 +0000 (23:35 -0400)]
Fix typos

Signed-off-by: tinyboxvk <13696594+tinyboxvk@users.noreply.github.com>
13 months agodesktop-entry: separate icon and app_id icon lookup
Consolatis [Tue, 7 Jan 2025 14:21:30 +0000 (15:21 +0100)]
desktop-entry: separate icon and app_id icon lookup

This patch splits desktop_entry_icon_lookup() into two separate functions
- desktop_entry_load_icon(): load a icon from the configured icon theme
- desktop_entry_load_icon_from_app_id(): load a icon name from a .desktop
  file based on the given app_id and supply it to _load_icon().

The _load_icon() function will be used in a future menu icon
implementation whereas the _load_icon_from_app_id() function is used
within the SSD titlebar window icon lookup routine.

13 months agodesktop-entry: accept uppercase icon endings
Consolatis [Mon, 6 Jan 2025 06:22:34 +0000 (07:22 +0100)]
desktop-entry: accept uppercase icon endings

13 months agostring-helpers: add str_endswith_ignore_case()
Consolatis [Mon, 6 Jan 2025 06:19:15 +0000 (07:19 +0100)]
string-helpers: add str_endswith_ignore_case()

13 months agoIME: fix stuck Ctrl when pressed Ctrl+F in Firefox with Fcitx5
tokyo4j [Mon, 6 Jan 2025 07:30:54 +0000 (16:30 +0900)]
IME: fix stuck Ctrl when pressed Ctrl+F in Firefox with Fcitx5

683f67b7 introduced another regression that the modifier state (Ctrl) is
stuck when Ctrl+F is pressed in some applications like Firefox while
Fcitx5 is running. This caused mouse scrolls to zoom in/out the UI.

Let me explain the cause in detail. When Ctrl+F is pressed, an input box
is opened in the application and Fcitx5 creates a new virtual keyboard
(VK), whose initial modifiers is empty. Then prior to 683f67b7, the
key/modifiers events flowed like this:

- The compositor detects F key-release
  - Modifiers (Ctrl pressed) are notified via _set_keyboard()
  - F key-release is forwarded to IM
- IM sends modifiers (Ctrl) back to the compositor via VK
  - **The modifiers on VK is updated (empty->Ctrl)**
  - **Modifers (Ctrl) are notified to the app**
- IM sends F key-release back to the compositor via VK
  - F key-release is notified to the app
- The compositor detects Ctrl key-release
  - Ctrl key-release is forwarded to IM
  - Modifiers (empty) are forwarded to IM
- IM sends Ctrl key-release back to the compsitor via VK
  - Ctrl key-release is notified to IM
- IM sends modifiers (empty) back to the compositor via VK
  - **The modifiers on VK is updated again (Ctrl->empty)**
  - **Modifiers (empty) are notified to the app**

Thus, the final modifiers (empty) is notified to the application as
expected. However, after 683f67b7, the key/modifiers events flowed like
this:

- The compositor detects F key-release
  - F key-release is directly notified to the app
  - The modifiers (Ctrl) is also notified to the app
- The compositor detects Ctrl key-release
  - Ctrl key-release is directly notified to the app
  - Modifiers (empty) are forwarded to IM
- IM sends modifiers (empty) back to the compositor via VK
  - **Modifier on VK is not updated (empty->empty)**
  - **The compositor ignores it**

So the final modifier (empty) is never notified to the application, which
causes stuck Ctrl modifier.

This commit fixes this by not forwarding the modifiers when it hasn't been
updated since it was forwarded previously. So after this commit, the
key/modifiers events flow like this:

- The compositor detects F key-release
  - F key-release is directly notified to the app
  - The modifiers (Ctrl) is also notified to the app
- The compositor detects Ctrl key-release
  - Ctrl key-release is directly notified to the app
  - The modifiers are directly notified to the app because the modifiers
    (empty) are the same as the last forwarded modifier (empty).

13 months agoIME: rename pressed_keys to forwarded_pressed_keys
tokyo4j [Mon, 6 Jan 2025 07:28:37 +0000 (16:28 +0900)]
IME: rename pressed_keys to forwarded_pressed_keys