]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
15 months agomenu: support borders
tokyo4j [Sun, 24 Nov 2024 05:40:40 +0000 (14:40 +0900)]
menu: support borders

This commit adds following theme configurations:

  menu.border.width: 1
  menu.border.color: #aaaaaa

15 months agotheme: set default values of window.*.border.color to #aaaaaa
tokyo4j [Sun, 24 Nov 2024 05:39:35 +0000 (14:39 +0900)]
theme: set default values of window.*.border.color to #aaaaaa

This makes the colors of titlebar and window borders different, but will
let menu.border.color (which will be supported soon) inherit
window.active.border.color just like Openbox does, without making the menu
borders around a selected menu item invisible.

15 months agoAdd scaled_rect_buffer
tokyo4j [Sat, 23 Nov 2024 05:17:15 +0000 (14:17 +0900)]
Add scaled_rect_buffer

scaled_rect_buffer is an implementation of scaled_scene_buffer and shows
an auto-scaling bordered rectangle. This is intended for menu borders,
but can be also useful for other elements like window switcher items.

We will support rounded corners for scaled_rect_buffer in the future.

15 months agoworkspaces: use view_for_each_reverse() to move omnipresent views
Consolatis [Tue, 12 Nov 2024 19:35:00 +0000 (20:35 +0100)]
workspaces: use view_for_each_reverse() to move omnipresent views

This ensures that the view ordering and focus behavior of
omnipresent views is the same when switching workspaces.

15 months agoview: add view_for_each_reverse() macro
Consolatis [Tue, 12 Nov 2024 19:34:29 +0000 (20:34 +0100)]
view: add view_for_each_reverse() macro

15 months agooutput: fix assert() fail when enabling an output that was disabled
John Lindgren [Sat, 23 Nov 2024 16:10:41 +0000 (11:10 -0500)]
output: fix assert() fail when enabling an output that was disabled

When the output is in the process of being enabled, but the new state
has not been committed yet, wlr_output->enabled is still false. So it's
not safe to assert that it's true in output_enable_adaptive_sync().

Fixes: 36e099fc93b3caf87e7f390a732fcec69373de8c
"view: ensure output is usable before setting adaptive sync"

15 months agodocs: describe some default values
tokyo4j [Sat, 23 Nov 2024 03:15:35 +0000 (12:15 +0900)]
docs: describe some default values

15 months agodocs: align format for describing default values
tokyo4j [Sat, 23 Nov 2024 03:14:40 +0000 (12:14 +0900)]
docs: align format for describing default values

15 months agoscaled-font-buffer: apply buffer sharing mechanism
tokyo4j [Mon, 18 Nov 2024 20:04:47 +0000 (05:04 +0900)]
scaled-font-buffer: apply buffer sharing mechanism

scaled_font_buffer.{width,height} are no longer set in _create_buffer()
since that function is not called when the buffer is reused from the
cache.

15 months agoscaled-scene-buffer: implement buffer sharing mechanism
tokyo4j [Mon, 18 Nov 2024 20:03:26 +0000 (05:03 +0900)]
scaled-scene-buffer: implement buffer sharing mechanism

Implementers can define impl->equal() which compares two
scaled-scene-buffers so that buffers are not allocated for visually
duplicated scaled-scene-buffers.

Currently this mechanism isn't applied for scaled-font-buffers since we
haven't defined impl->equal() for it.

15 months agocommon/list: add WL_LIST_INIT() macro
tokyo4j [Wed, 20 Nov 2024 18:39:16 +0000 (03:39 +0900)]
common/list: add WL_LIST_INIT() macro

15 months agoscaled-scene-buffer: allow multiple wlr_buffer_drops()
Consolatis [Fri, 15 Nov 2024 06:02:52 +0000 (07:02 +0100)]
scaled-scene-buffer: allow multiple wlr_buffer_drops()

This allows implementations of the interface to share a single
wlr_buffer for multiple wlr_scene_buffer nodes and still make
the scaled-scene-buffer handle the buffer drops.

wlr_scene_buffer holds an implicit lock while using a wlr_buffer
and scaled-scene-buffer.c holds additional locks for as long as
a buffer is within its internal cache.

This should ensure that a shared wlr_buffer never gets actually
dropped even if wlr_buffer_drop() has been called by another
scaled-scene-buffer instance using the same wlr_buffer.

15 months agoNEWS.md: fix author
Jens Peters [Wed, 20 Nov 2024 19:20:55 +0000 (20:20 +0100)]
NEWS.md: fix author

15 months agoMerge pull request #2360 from jp7677/sfdo-app-name
Johan Malm [Tue, 19 Nov 2024 21:49:56 +0000 (21:49 +0000)]
Merge pull request #2360 from jp7677/sfdo-app-name

feat: add libsfdo desktop entry name as OSD element

15 months agoosd: add desktop entry name option
Jens Peters [Mon, 18 Nov 2024 20:38:43 +0000 (21:38 +0100)]
osd: add desktop entry name option

Looks desktop entry name up from libsfdo.

15 months agosfdo: add sfdo_desktop_entry_name_lookup()
Jens Peters [Mon, 18 Nov 2024 18:03:39 +0000 (19:03 +0100)]
sfdo: add sfdo_desktop_entry_name_lookup()

15 months agoicon-loader: rename to desktop-entry
Jens Peters [Mon, 18 Nov 2024 17:59:49 +0000 (18:59 +0100)]
icon-loader: rename to desktop-entry

Also rename `struct icon_loader` to `struct sfdo`.

15 months agosrc/menu.c: remove unnecessary re-renderings of font buffers
tokyo4j [Mon, 18 Nov 2024 21:20:30 +0000 (06:20 +0900)]
src/menu.c: remove unnecessary re-renderings of font buffers

I missed that `scaled_font_buffer_update()` has `max_width` argument and
the subsequent calls to `scaled_font_buffer_set_max_width()` caused
unnecessary re-renderings.

15 months agoicon-loader: fall back to app-id if icon from .desktop failed
Consolatis [Sun, 17 Nov 2024 20:25:34 +0000 (21:25 +0100)]
icon-loader: fall back to app-id if icon from .desktop failed

Reported-By: LimeOn via IRC
15 months agoTranslation updates from weblate
Weblate [Wed, 13 Nov 2024 21:01:20 +0000 (22:01 +0100)]
Translation updates from weblate

Co-authored-by: Moo <hazap@hotmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/lt/
Translation: Labwc/labwc

15 months agoRemove some line terminators from log messages
Consolatis [Sat, 16 Nov 2024 00:12:43 +0000 (01:12 +0100)]
Remove some line terminators from log messages

15 months agorcxml.c: keep zfree(string) calls together to ease detecting missing ones
Consolatis [Fri, 15 Nov 2024 23:48:45 +0000 (00:48 +0100)]
rcxml.c: keep zfree(string) calls together to ease detecting missing ones

15 months agorcxml.c: fix mem leak for repeated string config entries
Consolatis [Fri, 15 Nov 2024 22:01:54 +0000 (23:01 +0100)]
rcxml.c: fix mem leak for repeated string config entries

An example is
```xml
<theme>
  <name>Numix</name>
</theme>
<theme name="Numix" />
```

Including various other variants.
Also change all other `free(x); x = xstrdup(y)` calls to `xstrdup_replace()`.

15 months agocommon/mem.h: introduce xstrdup_replace()
Consolatis [Fri, 15 Nov 2024 21:59:57 +0000 (22:59 +0100)]
common/mem.h: introduce xstrdup_replace()

15 months agorcxml.c: fix mem leak when deduplicating keybinds
Consolatis [Fri, 15 Nov 2024 21:58:44 +0000 (22:58 +0100)]
rcxml.c: fix mem leak when deduplicating keybinds

Before this patch `keybind->keysyms` wasn't free'd when
- deduplicating keybinds
- removing keybinds due to empty action list

This patch creates a shared `keybind_destroy()` helper
which gets used in all cases where a keybind is destroyed.

15 months agotheme: allow negative values for menu overlap
Jens Peters [Sat, 16 Nov 2024 10:53:49 +0000 (11:53 +0100)]
theme: allow negative values for menu overlap

This fixes a regression introduced with:
https://github.com/labwc/labwc/commit/dcd9b47e5b584a2559d41cd255bb043f11970d12

15 months agomenu: fix UAFs in menu_destroy() and item_destroy()
tokyo4j [Thu, 14 Nov 2024 09:16:43 +0000 (18:16 +0900)]
menu: fix UAFs in menu_destroy() and item_destroy()

This fixes use-after-free when there's only 1 desktop and
menu_hide_submenu() is called to delete "Workspaces" submenu in
client-menu before menu scenes are initialized.

As menu_create() and item_create() no longer initialize scenes after
76515316, menu->scene_tree and item->tree should be null-checked.

15 months agoplacement: set default placement policy to cascade
tokyo4j [Wed, 13 Nov 2024 21:12:27 +0000 (06:12 +0900)]
placement: set default placement policy to cascade

15 months agomenu: eliminate dead code
tokyo4j [Wed, 13 Nov 2024 23:30:55 +0000 (08:30 +0900)]
menu: eliminate dead code

The deleted lines were dead code that didn't make any sense (even if it
were not dead, it should have recreated the parent of the hidden menu
rather than the hidden menu itself).

15 months agomenu: fix menus disappearing when opening pipemenu
tokyo4j [Wed, 13 Nov 2024 23:14:11 +0000 (08:14 +0900)]
menu: fix menus disappearing when opening pipemenu

Commit 7651531 introduced a regression: `menu_update_scene()` which
re-creates a menu scene was called for all the menus when a pipemenu is
created, so the menus (parent of the pipemenu) were always moved to (0,0)
and hidden, and the pipemenu was incorrectly positioned.

This commit fixes it by calling `menu_update_scene()` only for the
pipemenu when it's created.

15 months agoview: ensure output is usable before setting adaptive sync
Consolatis [Wed, 13 Nov 2024 13:24:07 +0000 (14:24 +0100)]
view: ensure output is usable before setting adaptive sync

Fixes #2337

15 months agomenu: invalidate nested duplicated menus
tokyo4j [Wed, 13 Nov 2024 15:25:49 +0000 (00:25 +0900)]
menu: invalidate nested duplicated menus

Prior to this commit, nesting the same menus caused stack overflow at
`close_all_submenus()` when trying to open it.

15 months agomenu: consider padding when applying menu.width.{min,max}
tokyo4j [Tue, 12 Nov 2024 20:34:44 +0000 (05:34 +0900)]
menu: consider padding when applying menu.width.{min,max}

15 months agomenu: fix "menu.title.text.justify: right" not working
tokyo4j [Tue, 12 Nov 2024 20:14:53 +0000 (05:14 +0900)]
menu: fix "menu.title.text.justify: right" not working

15 months agomenu: refactor in preparation for richer menu design
tokyo4j [Sun, 10 Nov 2024 09:54:01 +0000 (18:54 +0900)]
menu: refactor in preparation for richer menu design

This commit separates the process of creating scene-trees of the menu
items into `{item,separator,title}_create_scene()`. This will make it
easier to draw richer menu designs like borders, paddings and rounded
corners.

15 months agosrc/menu.c: move some post_processing() and menu_update_width()
tokyo4j [Sun, 10 Nov 2024 09:51:48 +0000 (18:51 +0900)]
src/menu.c: move some post_processing() and menu_update_width()

15 months agomenu: fix UAF of server->menu_current
tokyo4j [Wed, 13 Nov 2024 14:57:42 +0000 (23:57 +0900)]
menu: fix UAF of server->menu_current

This fixes segfault when exiting with a menu opened, which is a regression
from eaf11fac.

15 months agoworkspaces: keep focus on omnipresent windows when switching workspaces
Consolatis [Tue, 12 Nov 2024 00:23:37 +0000 (01:23 +0100)]
workspaces: keep focus on omnipresent windows when switching workspaces

Fixes: #2329
15 months agoNEWS.md: interim update
Johan Malm [Mon, 11 Nov 2024 20:51:37 +0000 (20:51 +0000)]
NEWS.md: interim update

15 months agotheme: rename title_height to titlebar_height
tokyo4j [Tue, 12 Nov 2024 03:37:26 +0000 (12:37 +0900)]
theme: rename title_height to titlebar_height

Also removed the redundant initialization of title_height in
theme_builtin().

15 months agotheme: rename menu_item_padding to menu_items_padding
tokyo4j [Tue, 12 Nov 2024 03:36:21 +0000 (12:36 +0900)]
theme: rename menu_item_padding to menu_items_padding

15 months agotheme: move some variables into theme->window
tokyo4j [Tue, 12 Nov 2024 01:54:59 +0000 (10:54 +0900)]
theme: move some variables into theme->window

For example, variables:
  `theme->window_inactive_border_color`
  `theme->window_active_border_color`
are converted to:
  `theme->window[THEME_INACTIVE].border_color`
  `theme->window[THEME_ACTIVE].border_color`

15 months agotheme: reorder theme entries in documentation and codebase
tokyo4j [Tue, 12 Nov 2024 00:17:04 +0000 (09:17 +0900)]
theme: reorder theme entries in documentation and codebase

15 months agoserver: release all the resources on exit
tokyo4j [Mon, 11 Nov 2024 22:46:08 +0000 (07:46 +0900)]
server: release all the resources on exit

Release all the resources including wlr_allocator, wlr_renderer,
wlr_backend and wlr_scene. This makes it a lot easier to detect memory
leaks with ASAN.

On wlroots side, the commit ce615a44 needs to be reverted to detect memory
leaks with EGL renderer.

15 months agoserver: release server->ssd_hover_state on exit
tokyo4j [Mon, 11 Nov 2024 23:19:14 +0000 (08:19 +0900)]
server: release server->ssd_hover_state on exit

15 months agocosmic-workspace: destroy manager when wl_display is destroyed
tokyo4j [Mon, 11 Nov 2024 22:34:16 +0000 (07:34 +0900)]
cosmic-workspace: destroy manager when wl_display is destroyed

15 months agoseat: destroy seat->workspace_osd_timer on exit
tokyo4j [Mon, 11 Nov 2024 22:26:45 +0000 (07:26 +0900)]
seat: destroy seat->workspace_osd_timer on exit

15 months agoicon-loader: fix memory leak of icon_loader->icon_theme
tokyo4j [Mon, 11 Nov 2024 22:24:54 +0000 (07:24 +0900)]
icon-loader: fix memory leak of icon_loader->icon_theme

15 months agoosd: fix memory leak of output->osd_buffer
tokyo4j [Mon, 11 Nov 2024 22:23:40 +0000 (07:23 +0900)]
osd: fix memory leak of output->osd_buffer

15 months agosrc/output.c: skip painting output when session is not active
enometh [Mon, 11 Nov 2024 23:33:38 +0000 (05:03 +0530)]
src/output.c: skip painting output when session is not active

On switching to a console vt when an application is painting,
labwc produces a stream of log messages of the form
```
 `00:00:52.345 [ERROR] [../src/output-state.c:45] Failed to commit frame` lines.
``

This patch tries to follow the lead from the solution to this problem
in https://github.com/WayfireWM/wayfire/pull/2484.patch

As noted in that commit message, this patch depends on unreleased
patches to seatd (master) to work reliably, and there may be a a risk
of locking up the labwc if it is used with the seatd-0.8.0.

Check that the session is initialized (is not NULL) before checking it
is active.

Co-authored-by: Madhu <enometh@net.meer>
15 months agoinput: add hold-begin/-end gestures
Jens Peters [Sun, 10 Nov 2024 18:22:22 +0000 (19:22 +0100)]
input: add hold-begin/-end gestures

15 months agoinput: ensure visible cursor on gestures
Jens Peters [Sun, 10 Nov 2024 18:07:56 +0000 (19:07 +0100)]
input: ensure visible cursor on gestures

15 months agoinput: notify idle-manager on gestures
Jens Peters [Sun, 10 Nov 2024 18:07:27 +0000 (19:07 +0100)]
input: notify idle-manager on gestures

15 months agoinput: use CONNECT_SIGNAL macro
Jens Peters [Sun, 10 Nov 2024 18:05:55 +0000 (19:05 +0100)]
input: use CONNECT_SIGNAL macro

15 months agoenvironment: ignore env var assignments > 1 KiB (#2325)
Johan Malm [Sun, 10 Nov 2024 20:40:51 +0000 (20:40 +0000)]
environment: ignore env var assignments > 1 KiB (#2325)

...to guard against recursive constructs like FOO=$FOO:bar which would
grow on each reconfigure.

Add log message as well as a warning against this in the man page.

15 months agoinput: hide cursor when using touch input
Jens Peters [Sat, 2 Nov 2024 14:59:33 +0000 (15:59 +0100)]
input: hide cursor when using touch input

Hide the cursor on touch input and keep the cursur invisible
until pointer or tablet input.

15 months agoinput: close xdg-popups on touch down
Jens Peters [Fri, 1 Nov 2024 08:11:33 +0000 (09:11 +0100)]
input: close xdg-popups on touch down

Taken over and now shared from the tablet implementation.

15 months agoinput: move notify-idle-manager to tablet/touch handlers
Jens Peters [Tue, 29 Oct 2024 19:39:17 +0000 (20:39 +0100)]
input: move notify-idle-manager to tablet/touch handlers

Move them away from the cursor emulate functions. This
avoid calling them twice for touch motion.

Also notify idle manager on touch down/up.

15 months agoinput: clear pointer focus on touch input
Jens Peters [Sun, 27 Oct 2024 08:10:09 +0000 (09:10 +0100)]
input: clear pointer focus on touch input

Otherwise the pointer focus could interfere with touch input, like
showing hover effect on unexpected locations.

15 months agoinput: move touch only with one touch point
Jens Peters [Tue, 5 Nov 2024 19:59:14 +0000 (20:59 +0100)]
input: move touch only with one touch point

In other words, do not move the cursor when more than
one finger is down.

15 months agoinput: warp cursor to touch coordinates
Jens Peters [Sun, 27 Oct 2024 08:07:54 +0000 (09:07 +0100)]
input: warp cursor to touch coordinates

This makes the behavior consistent with non-touch
capable surfaces and the desktop.

15 months agomeson.build: increase wlroots dep to 0.18.1
Consolatis [Wed, 30 Oct 2024 18:49:29 +0000 (19:49 +0100)]
meson.build: increase wlroots dep to 0.18.1

This ensures users do not run into asserts()
when using the ext-foreign-toplevel-list protocol.

15 months agoforeign-toplevel: add ext-toplevel-list support
Consolatis [Mon, 12 Aug 2024 18:34:25 +0000 (20:34 +0200)]
foreign-toplevel: add ext-toplevel-list support

15 months agoforeign-toplevel: create generic abstraction
Consolatis [Mon, 12 Aug 2024 18:31:52 +0000 (20:31 +0200)]
foreign-toplevel: create generic abstraction

15 months agoview: add state change signals
Consolatis [Mon, 12 Aug 2024 18:19:45 +0000 (20:19 +0200)]
view: add state change signals

15 months agoTranslation updates from weblate
Weblate [Tue, 5 Nov 2024 21:01:19 +0000 (22:01 +0100)]
Translation updates from weblate

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/de/
Translation: Labwc/labwc

15 months agoicon: matching partial strings (#2266)
Simon Long [Fri, 8 Nov 2024 21:42:02 +0000 (21:42 +0000)]
icon: matching partial strings (#2266)

...to handle for example app-id="gimp-2.10" with file "gimp.desktop"

15 months agoaction.c: fix style
tokyo4j [Fri, 8 Nov 2024 12:01:06 +0000 (21:01 +0900)]
action.c: fix style

15 months agomenu: correctly center menu opened with <position {x,y}="center">
tokyo4j [Fri, 8 Nov 2024 11:55:13 +0000 (20:55 +0900)]
menu: correctly center menu opened with <position {x,y}="center">

Prior to this commit, a menu opened with:

  <action name="ShowMenu">
    <position x="center" y="center" />
  </action>

was not correctly centered when menu.items.padding.x is non-zero.

15 months agoRemove link to archlabslinux
tinyboxvk [Fri, 8 Nov 2024 21:26:50 +0000 (21:26 +0000)]
Remove link to archlabslinux

Project is no longer available.

https://archlabs.github.io/

15 months agosrc/seat.c: Allow pointer speed of -1
Simon Long [Fri, 8 Nov 2024 20:38:56 +0000 (20:38 +0000)]
src/seat.c: Allow pointer speed of -1

15 months agoFix broken links to Openbox
tinyboxvk [Fri, 8 Nov 2024 19:38:09 +0000 (15:38 -0400)]
Fix broken links to Openbox

Signed-off-by: tinyboxvk <13696594+tinyboxvk@users.noreply.github.com>
15 months agobuf.c: fix off by one bug in buf_add_char()
Johan Malm [Thu, 7 Nov 2024 21:08:09 +0000 (21:08 +0000)]
buf.c: fix off by one bug in buf_add_char()

Written-by: @Consolatis
Fixes: #2313
15 months agotests: add buf_add_char() test
Johan Malm [Thu, 7 Nov 2024 21:06:31 +0000 (21:06 +0000)]
tests: add buf_add_char() test

...to prove off-by-one test with ASAN.

15 months agooutput: factor out configure_new_output() from new_output_notify()
John Lindgren [Sun, 20 Oct 2024 00:12:10 +0000 (20:12 -0400)]
output: factor out configure_new_output() from new_output_notify()

... to make it possible in future to *not* immediately auto-configure
new outputs when connected. No functional change intended at this time.

15 months agooutput: move a few calls from new_output_notify()
John Lindgren [Sun, 20 Oct 2024 00:06:11 +0000 (20:06 -0400)]
output: move a few calls from new_output_notify()

... to more specific/logical locations, to make it possible in future to
*not* immediately auto-configure new outputs when connected.

In particular:

- Move regions_reconfigure_output() and session_lock_output_create()
  into add_output_to_layout(), which would be called also if the output
  is enabled later.

- Move seat_output_layout_changed() to do_output_layout_change() so it
  is called for any layout change, not just adding new outputs.

15 months agomenu: use only menu_separator_padding_width to pad separators w/o label
Tomi Ollila [Thu, 31 Oct 2024 18:26:32 +0000 (20:26 +0200)]
menu: use only menu_separator_padding_width to pad separators w/o label

I.e. drop the extra padding from menu_item_padding_x that got there
when separators with labels were implemented.

16 months agoCI: add discussion category to IRC notification
Consolatis [Wed, 6 Nov 2024 13:35:47 +0000 (14:35 +0100)]
CI: add discussion category to IRC notification

16 months agoCI: add IRC notification for discussion created
Consolatis [Wed, 6 Nov 2024 13:14:41 +0000 (14:14 +0100)]
CI: add IRC notification for discussion created

16 months agoTranslation updates from weblate
Weblate [Sun, 3 Nov 2024 21:01:24 +0000 (22:01 +0100)]
Translation updates from weblate

Co-authored-by: Roberalz <lumintnian@outlook.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/es/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/eu/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/gl/
Translation: Labwc/labwc

16 months agotearing: avoid permanent disable due to rejected commits (#2295)
Ricardo Steijn [Sun, 3 Nov 2024 21:05:46 +0000 (22:05 +0100)]
tearing: avoid permanent disable due to rejected commits (#2295)

Currently, the cursor plane does not allow async page flips which causes tearing page flips to be rejected if the cursor was moved.

However, in games where no cursor image is present, the async page flips can still work as expected.

Instead of permanently disabling tearing after too many failures, test the output state first before each frame to see if we can commit with tearing_page_flip set to true.

16 months agoAdd github issues template
Johan Malm [Sat, 2 Nov 2024 18:59:51 +0000 (18:59 +0000)]
Add github issues template

16 months agodocs: add documentation for window.button.height
tokyo4j [Sun, 3 Nov 2024 10:59:57 +0000 (19:59 +0900)]
docs: add documentation for window.button.height

16 months agoquery: fix three-state-parameter parsing, simplify match logic
Andrew J. Hesford [Thu, 31 Oct 2024 13:59:22 +0000 (09:59 -0400)]
query: fix three-state-parameter parsing, simplify match logic

Fixes: #2288.
16 months agoconfig/rcxml.c: fix parsing of three-state query parameters
Andrew J. Hesford [Thu, 31 Oct 2024 01:05:23 +0000 (21:05 -0400)]
config/rcxml.c: fix parsing of three-state query parameters

16 months agoquery: support additional conditions for matching clients
Orfeas [Thu, 17 Oct 2024 23:07:52 +0000 (02:07 +0300)]
query: support additional conditions for matching clients

Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
Closes: #2245.
16 months agosession-lock: make session_lock_output_create() safe to call twice
John Lindgren [Sun, 20 Oct 2024 00:02:08 +0000 (20:02 -0400)]
session-lock: make session_lock_output_create() safe to call twice

session_lock_output_create() can safely no-op if the lock output has
already been created for the specified output. This scenario doesn't
happen currently, and the change is in preparation for some other
output-related changes I am working on. But I think it's a nice code
improvement worth merging separately.

16 months agooutput: remove ported wlr_output functions
John Lindgren [Sun, 20 Oct 2024 06:55:12 +0000 (02:55 -0400)]
output: remove ported wlr_output functions

We have several wlr_output_* functions which are just wrappers around
corresponding wlr_output_state_* functions and don't actually touch the
wlr_output itself. These probably made some sense historically, but IMHO
they are just confusing now. So remove them and call wlr_output_state_*
directly.

Rename wlr_output_commit() (still useful) to output_state_commit().

16 months agoAdd mouse emulation for touch devices (#2277)
Simon Long [Tue, 29 Oct 2024 19:22:01 +0000 (19:22 +0000)]
Add mouse emulation for touch devices (#2277)

16 months agosrc/main.c: add environment variable LABWC_VER
01micko [Mon, 21 Oct 2024 01:07:01 +0000 (11:07 +1000)]
src/main.c: add environment variable LABWC_VER
src/config/session.c add env var LABWC_VER
This could be useful going forward for helper programs
such as `labwc-menu-generator` or `labwc-tweaks`

16 months agokeyboard: broadcast modifiers
Johan Malm [Sun, 27 Oct 2024 11:54:06 +0000 (11:54 +0000)]
keyboard: broadcast modifiers

...to all clients rather than just the one with keyboard focus on keyboard
enter/create, modifer press/release and wlr_seat_set_keyboard().

This enables:

- Clients such as panels to display the current keyboard layout without
  introducing new wayland protocols or other IPC.

- Unfocused xdg-shell clients to understand button press with keyboard
  modifiers for example Ctrl+click.

The keymap is forwarded to all clients in wlr_seat_set_keyboard(). When a
keymap contains multiple layouts, the selection is made via modifiers,
which previously were only sent to the client with keyboard focus.

Tested with: https://github.com/johanmalm/keyboard-layout

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4496

Fixes: #2271
16 months agomenu: use "MenuHeader" font height in separators with label
Tomi Ollila [Sat, 26 Oct 2024 14:14:27 +0000 (17:14 +0300)]
menu: use "MenuHeader" font height in separators with label

16 months agoTranslation updates from weblate
Weblate [Sun, 27 Oct 2024 12:24:52 +0000 (13:24 +0100)]
Translation updates from weblate

Co-authored-by: Peter Jespersen <flywheel@illogical.dk>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/da/
Translation: Labwc/labwc

16 months agobuild: bump version to 0.8.1
Johan Malm [Fri, 25 Oct 2024 18:49:33 +0000 (19:49 +0100)]
build: bump version to 0.8.1

16 months agoNEWS.md: update for 0.8.1
Johan Malm [Mon, 21 Oct 2024 20:10:08 +0000 (21:10 +0100)]
NEWS.md: update for 0.8.1

16 months agobuild: require libsfdo >=0.1.3
Johan Malm [Thu, 24 Oct 2024 20:59:21 +0000 (21:59 +0100)]
build: require libsfdo >=0.1.3

16 months agomenu: fix UAF in client-list-combined-menu after window destruction
Johan Malm [Wed, 23 Oct 2024 19:47:50 +0000 (20:47 +0100)]
menu: fix UAF in client-list-combined-menu after window destruction

Update client-list-combined-menu when a window is destroyed to avoid
SEGFAULT when selecting an that window entry in it.

16 months agodocs: replace two 'we's with passive forms
Tomi Ollila [Mon, 21 Oct 2024 20:35:49 +0000 (23:35 +0300)]
docs: replace two 'we's with passive forms

To match the common style in docs/

16 months agosrc/icon-loader.c: skip non application entries for wmclass lookup
Consolatis [Sun, 20 Oct 2024 16:56:39 +0000 (18:56 +0200)]
src/icon-loader.c: skip non application entries for wmclass lookup

Fixes: #2254
16 months agoinput: add comments about tablet mouse emulation
Jens Peters [Sun, 20 Oct 2024 16:58:07 +0000 (18:58 +0200)]
input: add comments about tablet mouse emulation