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

16 months agosrc/action.c: fix client-send-to-menu not properly updated (#2246)
Hiroaki Yamamoto [Sun, 20 Oct 2024 08:58:09 +0000 (17:58 +0900)]
src/action.c: fix client-send-to-menu not properly updated (#2246)

Before this commit, client-menu needed to be opened for
client-send-to-menu to be updated.

16 months agomenu: fix memory leak in update_client_send_to_menu() (#2252)
Hiroaki Yamamoto [Sun, 20 Oct 2024 08:44:32 +0000 (17:44 +0900)]
menu: fix memory leak in update_client_send_to_menu() (#2252)

16 months agomenu: fix the calculation for centered titles (#2251)
Hiroaki Yamamoto [Sun, 20 Oct 2024 08:41:53 +0000 (17:41 +0900)]
menu: fix the calculation for centered titles (#2251)

16 months agocursor: guard against NULL dereference (#2250)
Johan Malm [Sat, 19 Oct 2024 18:44:50 +0000 (19:44 +0100)]
cursor: guard against NULL dereference (#2250)

...in apply_constraint()

Reported-by: Blackb|rd
16 months agoicon-loader: use relaxed load options (#2248)
Johan Malm [Sat, 19 Oct 2024 18:44:24 +0000 (19:44 +0100)]
icon-loader: use relaxed load options (#2248)

16 months agocursor: send a frame event after emulated button events (#2244)
Hiroaki Yamamoto [Thu, 17 Oct 2024 19:12:15 +0000 (04:12 +0900)]
cursor: send a frame event after emulated button events (#2244)

This fixes the issue that emulated tablet/touchscreen button events
sometimes don't take effect on applications immediately.

16 months agoNEWS.md: interim update
Johan Malm [Fri, 27 Sep 2024 20:40:30 +0000 (21:40 +0100)]
NEWS.md: interim update

16 months agosrc/theme.c: fix misuse of wl_list_for_each
tokyo4j [Sun, 13 Oct 2024 22:55:15 +0000 (07:55 +0900)]
src/theme.c: fix misuse of wl_list_for_each

The iterator value of `wl_list_for_each` should never be referenced
outside the loop because it points to invalid memory location when the
list is empty.

16 months agotheme: tidy up documentation
Johan Malm [Sun, 13 Oct 2024 19:43:18 +0000 (20:43 +0100)]
theme: tidy up documentation

16 months agocursor: fix button release events sometimes not being sent
tokyo4j [Mon, 7 Oct 2024 00:20:58 +0000 (09:20 +0900)]
cursor: fix button release events sometimes not being sent

When `wlr_seat_pointer_notify_button()` is called on a button press event,
that funtion must also be called on the subsequent button release event
because otherwise wlroots thinks the button is kept pressed and it
causes issues with validating DnD requests from clients, where only one
button must be pressed. This was the case when a CSD client opens a
client-menu via `show_window_menu` request after pressing its window with
the right button because we were always not notifying button release
events while a menu is open.

So let's keep track of bound (pressed but not notified) buttons and notify
button release events only when the button is not bound, like we are doing
for key-state.

16 months agokey-state.c: generalize set operations
tokyo4j [Mon, 7 Oct 2024 00:15:34 +0000 (09:15 +0900)]
key-state.c: generalize set operations

16 months agoserver: add dmabuf feedback
Jens Peters [Sun, 13 Oct 2024 12:13:01 +0000 (14:13 +0200)]
server: add dmabuf feedback

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
16 months agoTranslation updates from weblate
Weblate [Sat, 12 Oct 2024 07:24:46 +0000 (09:24 +0200)]
Translation updates from weblate

Co-authored-by: bittin <bittin@reimu.nl>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/sv/
Translation: Labwc/labwc

16 months agotheme: replace *.hover.bg.shape with *.hover.bg.corner-radius
tokyo4j [Sat, 12 Oct 2024 06:06:23 +0000 (15:06 +0900)]
theme: replace *.hover.bg.shape with *.hover.bg.corner-radius

16 months agoMerge pull request #2189 from johanmalm/window-button-height
Johan Malm [Wed, 9 Oct 2024 06:04:09 +0000 (07:04 +0100)]
Merge pull request #2189 from johanmalm/window-button-height

Titlebar related breaking changes

16 months agotheme: round the corner button correctly
tokyo4j [Tue, 8 Oct 2024 21:41:52 +0000 (06:41 +0900)]
theme: round the corner button correctly

The rounded mask buffer to be applied to the corner button buffer should
be resized and shifted when there's a vertical gap between the button
and the window border.

16 months agossd: minor logic simplification
Johan Malm [Tue, 8 Oct 2024 20:27:19 +0000 (21:27 +0100)]
ssd: minor logic simplification

No functional change intended

16 months agotheme: add window.titlebar.padding.{width,height}
Johan Malm [Tue, 8 Oct 2024 16:52:57 +0000 (17:52 +0100)]
theme: add window.titlebar.padding.{width,height}

...to replace padding.{width,height} to minimize breaking changes with the
visual appearance of the titlebar.

With the diverging labwc specification for the titlebar (listed below)
we have to choose between (a) not supporting the padding.{width,height}
option which exist in many extant Openbox themes to keep titlebar height
(almost) the same; or (b) making the allocated button areas much smaller
and not keeping the default hover going all the way to the edges. All in
all it just seems a lot simpler and cleaner to break this link to the
openbox spec.

Examples of previous change driving the requirement for this change:

- SVG and PNG support which often results in large icons with hover
  effects.
- Theme option window.button.{height,width}
- Larger default areas for icons (26x26)

In way of an example, Numix theme sets a padding.height of 6 which would
have resulted in a titlebar 12px taller without this change.

16 months agotheme: change padding.height default to 0
Johan Malm [Sun, 29 Sep 2024 17:32:51 +0000 (18:32 +0100)]
theme: change padding.height default to 0

...because now that window.button.height determines the height of button
hover effect the visible appearance of the titlebar will change unless
we reduce the padding to zero.

Backward compatibility notice: If a users theme sets padding.height to a
value greater than zero, the titlebar will be taller compared with
openbox. This can be fixed by either reducing window.button.height or
overriding padding.height

16 months agotheme: derive titlebar height from its objects
Johan Malm [Sun, 29 Sep 2024 17:25:23 +0000 (18:25 +0100)]
theme: derive titlebar height from its objects

...including the new window.button.height