]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
14 months agosrc/osd.c: make osd_preview_restore() private in osd.c
tokyo4j [Sun, 29 Dec 2024 15:44:12 +0000 (00:44 +0900)]
src/osd.c: make osd_preview_restore() private in osd.c

14 months agosrc/desktop.c: remove osd_review_restore() call in desktop_cycle_view()
tokyo4j [Sun, 29 Dec 2024 15:38:43 +0000 (00:38 +0900)]
src/desktop.c: remove osd_review_restore() call in desktop_cycle_view()

It was a cruft from days when we used to walk scene-nodes to get the next
view to cycle.

14 months agokeyboard: set numlock to off by default
Johan Malm [Sun, 29 Dec 2024 17:32:23 +0000 (17:32 +0000)]
keyboard: set numlock to off by default

...to avoid surprises on Acer Aspire One laptops where the numeric
keyboard does not physically exist but "overlaps" the qwerty keyboard.

Reported-by: staryvyr on IRC
Note: We do not like changing defaults, but feel that there is a good
reason for this one.

14 months agowlr-foreign-toplevel: send initial pre-map state
Consolatis [Sun, 29 Dec 2024 00:43:04 +0000 (01:43 +0100)]
wlr-foreign-toplevel: send initial pre-map state

Fixes: #2460
14 months agoproject wide: adapt to new non-NULL value of view_get_string_prop()
Consolatis [Sun, 29 Dec 2024 01:18:27 +0000 (02:18 +0100)]
project wide: adapt to new non-NULL value of view_get_string_prop()

14 months agoview: fix NULL string_prop crash
Johan Malm [Fri, 27 Dec 2024 22:37:35 +0000 (22:37 +0000)]
view: fix NULL string_prop crash

...when app_id is NULL.

Make sure view_get_string_prop() never returns NULL because it is so easy
to misuse. Same for the respective xwayland/xdg impl methods in case
anyone decides to (incorrectly) call them directly in future.

Fixes: #2453
14 months agoClear keyboard/pointer focus on Move/Resize, window switcher and menu
tokyo4j [Sat, 28 Dec 2024 15:48:55 +0000 (00:48 +0900)]
Clear keyboard/pointer focus on Move/Resize, window switcher and menu

The previous revert fixed the problem of stuck modifier keys with
keybinds in Blender, but made Firefox show its menu bar with Alt-*
keybinds. This is fundamentally inevitable due to the limitation of
wayland protocol, but at least for the default Alt-Tab keybind for
window switcher, we can mitigate this problem by clearing the keyboard
focus when the window switcher is activated. This is what KWin does, and
we decided to follow that.

So in this commit, keyboard and pointer focus are temporarily cleared
while Move/Resize, window switcher and menu interactions and restored
after them. We slightly deviate from KWin as KWin doesn't clear the
keyboard focus while Move/Resize, but it solves our existing problem
that Firefox shows its menu bar after dragging it with default Alt-Drag
mousebind, and this is what Mutter does.

We considered other solutions, but they don't work well:
1. Send wl_keyboard.{leave,enter} every time keybinds/mousebinds are
   triggered. This solves the Firefox's menu bar problem, but that
   sounds like a workaround and sending unnecessary events every time is
   not desirable.
2. Send release events for both modifiers and keys even when they are
   bound to keybinds. This is what Mutter is doing, but it looks like an
   implementation issue and violates wayland protocol.

14 months agoRevert "keyboard: include pressed modifiers in bound set"
tokyo4j [Sun, 22 Dec 2024 15:05:22 +0000 (00:05 +0900)]
Revert "keyboard: include pressed modifiers in bound set"

This reverts commit 98bf316ee6632f62ec205904d74eabd8b3e9d15b.

14 months agoRevert "keyboard: add window rule to send release-events (#2377)"
tokyo4j [Sun, 22 Dec 2024 13:04:15 +0000 (22:04 +0900)]
Revert "keyboard: add window rule to send release-events (#2377)"

This reverts commit 2f8afb2376cfa8eeb89fc5afffa869be68d3988e.

14 months agoimg: fix scaling for rendering large image in non-square rectangle
tokyo4j [Tue, 24 Dec 2024 04:39:25 +0000 (13:39 +0900)]
img: fix scaling for rendering large image in non-square rectangle

16dbdc6 caused a regression that the vscode icon (1024x1024) in the
titlebar is cut off with following configuraion:

  window.button.width: 26
  window.button.height: 16

14 months agosrc/output.c: remove output_usable_area_scaled()
tokyo4j [Mon, 23 Dec 2024 10:09:26 +0000 (19:09 +0900)]
src/output.c: remove output_usable_area_scaled()

14 months agoDon't open menu or start window switching while other server interaction
tokyo4j [Sat, 28 Dec 2024 08:03:26 +0000 (17:03 +0900)]
Don't open menu or start window switching while other server interaction

This should make the transition of the server state more predictable and
prevent potential bugs.

14 months agoCheck input_mode to see whether window switcher is active or not
tokyo4j [Sat, 28 Dec 2024 08:42:26 +0000 (17:42 +0900)]
Check input_mode to see whether window switcher is active or not

...rather than "if (server->osd_state.cycle_view){..}".

14 months agoAdd LAB_INPUT_STATE_WINDOW_SWITCHER
tokyo4j [Sat, 28 Dec 2024 07:09:05 +0000 (16:09 +0900)]
Add LAB_INPUT_STATE_WINDOW_SWITCHER

14 months agoaction: add WarpCursor action
Orfeas [Sun, 22 Dec 2024 12:48:47 +0000 (14:48 +0200)]
action: add WarpCursor action

14 months agotheme: demote padding.height warning
Johan Malm [Mon, 23 Dec 2024 21:29:46 +0000 (21:29 +0000)]
theme: demote padding.height warning

...from WLR_ERROR to WLR_INFO to avoid 'false' logging when Openbox themes
contain the padding.height settings. Whilst this option is not supported,
the visual appearance is very close to that of Openbox with common themes.

The background to this is that Labwc theme specification has diverged
slightly from that of Openbox with respect to titlebar padding to support
more contemporary looks whilst avoiding breaking changes. For full details
see commit: e16e78e7a4a6e40c8184edd7bb483b0f395482d0

Suggested-by: @Consolatis
14 months agossd: rework titlebar button rendering
tokyo4j [Thu, 28 Nov 2024 10:21:18 +0000 (19:21 +0900)]
ssd: rework titlebar button rendering

- fix that icons for normal/hovered/rounded buttons are not placed
  exactly the same position
- fix blurry window button icons in scaled outputs

This commit introduces lab_img and scaled_img_buffer and uses them for
rendering icons in the window titlebar. Now the process of rendering
button icons are split into 2 phases: loading with lab_img_load() and
creating scene-nodes for them with scaled_img_buffer_create(). This
might incur some additional overhead since we no longer preload icon
textures, but the rendering of icon only happens for the first window
as backing buffers are shared and the overhead won't be noticeable.
This commit also simplifies the process of centering icon buffer in the
button, by creating icon buffers in a fixed geometry via
lab_img_render().

14 months agonode: add node_scaled_scene_buffer_from_node
tokyo4j [Thu, 28 Nov 2024 12:34:24 +0000 (21:34 +0900)]
node: add node_scaled_scene_buffer_from_node

14 months agoext-workspace protocol integration
Consolatis [Tue, 10 Dec 2024 05:26:19 +0000 (06:26 +0100)]
ext-workspace protocol integration

14 months agoext-workspace protocol implementation
Consolatis [Mon, 18 Nov 2024 20:16:10 +0000 (21:16 +0100)]
ext-workspace protocol implementation

14 months agocursor: fix focus when menu is closed by clicking its border
tokyo4j [Thu, 19 Dec 2024 08:04:10 +0000 (17:04 +0900)]
cursor: fix focus when menu is closed by clicking its border

Before this commit, the pointer focus is cleared when a menu is closed
by clicking its border. This is because get_cursor_context() returns
type=LAB_SSD_NONE when the cursor is on the menu border and
cursor_update_common() clears the pointer focus. This commit fixes this
by replacing cursor_update_common() with cursor_update_focus(), which
calls get_cursor_context() again after the menu scene-node is hidden.

14 months agolayer: update pointer focus on popup destruction
tokyo4j [Thu, 19 Dec 2024 10:01:08 +0000 (19:01 +0900)]
layer: update pointer focus on popup destruction

Same as previous commit

14 months agoxdg-popup: update pointer focus on popup destruction
tokyo4j [Tue, 17 Dec 2024 17:13:10 +0000 (02:13 +0900)]
xdg-popup: update pointer focus on popup destruction

Before this commit, closing a popup didn't move the pointer focus to the
main toplevel until the cursor is moved.

14 months agomenu: put menu_tree above overlay layer
Johan Malm [Mon, 1 Jul 2024 20:47:19 +0000 (21:47 +0100)]
menu: put menu_tree above overlay layer

14 months agomenu: slightly slide menus opened with atCursor="no"
tokyo4j [Wed, 18 Dec 2024 16:06:48 +0000 (01:06 +0900)]
menu: slightly slide menus opened with atCursor="no"

This is reland of 2ade6a1e which was reverted with 21bd5b00, but this
prevents the x-position of the menu from being negative and slides menus
opened with Alt-Space too.

14 months agostring-helpers.c: add str_starts_with()
Johan Malm [Tue, 20 Aug 2024 16:59:46 +0000 (17:59 +0100)]
string-helpers.c: add str_starts_with()

14 months agoscaled-scene-buffer: reduce unnecessary renderings
tokyo4j [Tue, 3 Dec 2024 07:18:52 +0000 (16:18 +0900)]
scaled-scene-buffer: reduce unnecessary renderings

Prior to this commit, a backing buffer with scale 1 was always created for
a scaled_scene_buffer before showing it, and backing buffers for specific
scales were created on output_enter events.

This commit removes this redundant re-renderings by calling
wlr_scene_buffer_set_dest_size() upon scaled_scene_buffer creation just to
receive output_enter events and delaying the first rendering to the first
output_enter event.

I needed to add font_get_buffer_size() to obtain the size of a font buffer
without actually creating it.

14 months agos/xmlParseMemory/xmlReadMemory/
Johan Malm [Sun, 8 Dec 2024 17:21:11 +0000 (17:21 +0000)]
s/xmlParseMemory/xmlReadMemory/

...as xmlParseMemory() is deprecated

14 months agoIME: don't forward key-release without correspinding key-press
tokyo4j [Tue, 17 Dec 2024 03:06:05 +0000 (12:06 +0900)]
IME: don't forward key-release without correspinding key-press

After commit e2189903 in wlroots, when ctrl-f is pressed in firefox with
a IME client running, the following key-release event for "f" is not
sent, thus "f" is repeated like "ffffffffff..." in the input box of
firefox. This is because the key-release event for "f" is firstly
forwarded to the IME client and then sent via the virtual keyboard created
by the IME client while the key-press event is sent via physical
keyboard, and with e2189903, key-release events without a corresponding
key-press event on the same keyboard is not emitted to the compositor.

So this commit fixes this problem by not forwarding the key-release event
to the IME client unless the corresponding key-press event was also
forwarded.

14 months agocosmic-workspaces: remove workspace_set_hidden() calls
Consolatis [Tue, 10 Dec 2024 05:10:22 +0000 (06:10 +0100)]
cosmic-workspaces: remove workspace_set_hidden() calls

It is a concept that labwc does not support.

14 months agocosmic-workspaces: add cosmic_ prefix
Consolatis [Mon, 18 Nov 2024 19:45:11 +0000 (20:45 +0100)]
cosmic-workspaces: add cosmic_ prefix

In preperation for a future ext-workspace integration.

14 months agolabwc-config(5): describe how keys are processed
Johan Malm [Mon, 16 Dec 2024 20:13:58 +0000 (20:13 +0000)]
labwc-config(5): describe how keys are processed

...when matching against keybinds.

Copied from:

https://github.com/labwc/labwc/blob/63dc609085d42d16401e23079bb50e2f07e31de5/src/input/keyboard.c#L215-L238

14 months agocosmic-workspaces: abstract transaction-addon
Consolatis [Mon, 18 Nov 2024 17:38:42 +0000 (18:38 +0100)]
cosmic-workspaces: abstract transaction-addon

This allows to use it for a future ext-workspace implementation.
It is also more generalized so can be used for other protocol
implementation in the future in case the protocols require some
kind of transaction management.

14 months agoTranslation updates from weblate
Weblate [Sun, 15 Dec 2024 01:13:10 +0000 (02:13 +0100)]
Translation updates from weblate

Co-authored-by: vTT <vttfreebsd@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/fr/
Translation: Labwc/labwc

14 months agoREADME.md: add "lightweight and box-inspired"
Johan Malm [Sat, 14 Dec 2024 21:01:24 +0000 (21:01 +0000)]
README.md: add "lightweight and box-inspired"

14 months agomenu: improve algorithm for menu placement with xdg-positioner
tokyo4j [Mon, 25 Nov 2024 21:42:08 +0000 (06:42 +0900)]
menu: improve algorithm for menu placement with xdg-positioner

This commit delegates the calculation for menu position into wlroots
utilities for xdg_positioner.

Notable functional changes are:
- Slide the menu to fit in the output when it's opened out of the output
  (e.g. top-left window menu is opened when the window is overflowing to
  the left), rather than not updating the menu at all.
- The horizontal alignment of menus is now determined based on the size of
  each (sub)menu alone rather than the total width of entire menu tree.
  This means submenus can now overlap with is parents, but this is no
  longer a problem since we recently added support for menu borders.
- Fixed that pipemenus always follow the alignment of its parent even when
  it overflows from the output.

14 months agolabwc-actions(5): add missing position option to ShowMenu
Johan Malm [Sun, 8 Dec 2024 17:24:32 +0000 (17:24 +0000)]
labwc-actions(5): add missing position option to ShowMenu

14 months agoREADME.md: add gammastep
Johan Malm [Fri, 1 Dec 2023 22:23:41 +0000 (22:23 +0000)]
README.md: add gammastep

14 months agoquery: extend "monitor" query & add missing docs
Orfeas [Thu, 5 Dec 2024 18:24:41 +0000 (20:24 +0200)]
query: extend "monitor" query & add missing docs

14 months agofont: remove arrow character from font buffer
tokyo4j [Tue, 3 Dec 2024 07:09:40 +0000 (16:09 +0900)]
font: remove arrow character from font buffer

Arrow signs are specific to submenu items, so they would be more natural
to be handled in menu.c rather than accepting "arrow" in
font_buffer_create().

Also I allowed non-positive numbers for max_width in font_buffer_create(),
in which case the natural font width is used as the buffer width.

14 months agomenu: some refactor
tokyo4j [Tue, 3 Dec 2024 06:58:07 +0000 (15:58 +0900)]
menu: some refactor

- Don't store font/background buffers in menuitem struct since we no
  longer dynamically update buffers of existing menuitems.
- Factor out the duplicated codes for creating menu item scenes for each
  unselected/selected states.

14 months agoCONTRIBUTING.md: update package maintainer list
Consolatis [Fri, 13 Dec 2024 22:29:11 +0000 (23:29 +0100)]
CONTRIBUTING.md: update package maintainer list

14 months agoview: s/scene_node/content_node/
tokyo4j [Fri, 13 Dec 2024 08:22:54 +0000 (17:22 +0900)]
view: s/scene_node/content_node/

14 months agobuild: bump version to 0.8.2
Johan Malm [Fri, 13 Dec 2024 19:12:14 +0000 (19:12 +0000)]
build: bump version to 0.8.2

14 months agoNEWS.md: update for 0.8.2
Johan Malm [Wed, 4 Dec 2024 21:10:05 +0000 (21:10 +0000)]
NEWS.md: update for 0.8.2

14 months agodocs/environment: remove example MOZ_ENABLE_WAYLAND=1
Johan Malm [Thu, 12 Dec 2024 19:56:20 +0000 (19:56 +0000)]
docs/environment: remove example MOZ_ENABLE_WAYLAND=1

...because it has not been relevant since before firefox v121 and even
firefox-esr on Debian bullseye is now at v128.

Suggested-by: cry0xen
14 months agoconfig: only default to xwayland persistence on old wlroots versions
Andrew J. Hesford [Wed, 11 Dec 2024 19:57:07 +0000 (14:57 -0500)]
config: only default to xwayland persistence on old wlroots versions

This is a compile-time check, so it will be too conservative if somebody
updates wlroots after building labwc, but that is still better than the
alternatives.

14 months agoscripts: add wl_compcheck.py
Consolatis [Mon, 9 Dec 2024 22:06:58 +0000 (23:06 +0100)]
scripts: add wl_compcheck.py

Simple utility to allow protocol and version comparison between different
running compositors. This can be used to detect missing protocols or
versions in labwc. See for example this result when running against the
current labwc master and sway 1.10 (nested, results on DRM may differ):

  Protocols missing from labwc @ wayland-0
  ext_transient_seat_manager_v1                   1
  wl_compositor                                   6  (has version 5)
  wp_alpha_modifier_v1                            1
  wp_content_type_manager_v1                      1
  xdg_wm_base                                     5  (has version 3)
  zwp_keyboard_shortcuts_inhibit_manager_v1       1

  Protocols missing from sway @ wayland-1
  wl_drm                                          2
  zcosmic_workspace_manager_v1                    1

14 months agoTranslation updates from weblate
Weblate [Tue, 10 Dec 2024 02:04:35 +0000 (03:04 +0100)]
Translation updates from weblate

Co-authored-by: 이정희 <daemul72@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ko/
Translation: Labwc/labwc

14 months agoconfig: temporarily set xwaylandPersistence to 'yes' by default (#2414)
Johan Malm [Sun, 8 Dec 2024 18:36:59 +0000 (18:36 +0000)]
config: temporarily set xwaylandPersistence to 'yes' by default (#2414)

...to avoid a bug that is present in wlroots <0.18.2 and which has the
potential to crash the compositor when performing a drag-and-drop action
at the same time as the XWayland server is shutting down.

This will be reverted when wlroots-0.18.2 can be linked with.

Related-to: #2371
14 months agolabwc-config(5): add <xwaylandPersistence> to "core" section example
Johan Malm [Sun, 8 Dec 2024 18:21:28 +0000 (18:21 +0000)]
labwc-config(5): add <xwaylandPersistence> to "core" section example

14 months agoTranslation updates from weblate
Weblate [Sun, 8 Dec 2024 21:01:19 +0000 (22:01 +0100)]
Translation updates from weblate

Co-authored-by: unabomberlive <7alinchik@mail.ru>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ru/
Translation: Labwc/labwc

14 months agolabwc-config(5): reflow some paragraphs to stay within 80 columns
Johan Malm [Sun, 8 Dec 2024 17:49:33 +0000 (17:49 +0000)]
labwc-config(5): reflow some paragraphs to stay within 80 columns

14 months agolabwc-config(5): add XML examples at start of some sections
Johan Malm [Sun, 8 Dec 2024 17:48:16 +0000 (17:48 +0000)]
labwc-config(5): add XML examples at start of some sections

14 months agoconfig/rcxml.c: fix crash in <touch> section
Johan Malm [Sun, 8 Dec 2024 17:31:23 +0000 (17:31 +0000)]
config/rcxml.c: fix crash in <touch> section

...when options are specified as elements leading to hitting the assert()
in xstrdup().

Reproduce by using this rc.xml:

```
<?xml version="1.0"?>
<labwc_config>
  <touch>
    <deviceName>foo</deviceName>
    <mapToOutput>bar</mapToOutput>
  </touch>
</labwc_config>
```

It is likely that <touch> was only tested with options as attributes.

14 months agoaction: fix menu position with "x"/"y" arguments in multi-monitor setup
tokyo4j [Sun, 8 Dec 2024 08:59:56 +0000 (17:59 +0900)]
action: fix menu position with "x"/"y" arguments in multi-monitor setup

Prior to this commit, output-relative coordinate was passed to
menu_open_root() as the menu position when it's designated via "x"/"y"
arguments in ShowMenu action, so menu can be misplaced to the output other
than the one in which the cursor is in.

14 months agoRevert "menu: slightly slide menus opened from buttons"
tokyo4j [Sun, 8 Dec 2024 07:05:53 +0000 (16:05 +0900)]
Revert "menu: slightly slide menus opened from buttons"

With 2ade6a1, negative x-values can be passed to menu_configure() when the
window menu is opened from top-left button in a maximized window, but
wlr_output_layout_output_at() couldn't find the output for the coordinate
since it's out of the output layout, thus it just opened the menu without
updating its position.

As the next release is close and the visual improvement by 2ade6a1 is not
very impactful for UX, let's revert it for now.

15 months agomenu: slightly slide menus opened from buttons
tokyo4j [Fri, 6 Dec 2024 04:57:50 +0000 (13:57 +0900)]
menu: slightly slide menus opened from buttons

This commit slides menus opened from buttons (with atCursor="no") to the
left by menu.border.width. This makes the location of the window menu
look more natural, especially when it's opened from the window icon in
the left corner of the titlebar.

15 months agoAdd support for xdg-foreign-v1 and xdg-foreign-v2 (#2400)
Consolatis [Tue, 3 Dec 2024 20:23:57 +0000 (21:23 +0100)]
Add support for xdg-foreign-v1 and xdg-foreign-v2 (#2400)

15 months agoserver.c: block privileged protocols for sandboxed clients
Consolatis [Mon, 2 Dec 2024 02:44:57 +0000 (03:44 +0100)]
server.c: block privileged protocols for sandboxed clients

In the longer term we want this to be user-configurable (and also depend
on the sandbox engine, app_id and instance).

But dropping privileged protocols for sandboxed clients in the meantime
seems like a sensible thing to do and matches user expectations.

Related: #2392

15 months agoNEWS.md: interim update
Johan Malm [Sun, 1 Dec 2024 20:04:23 +0000 (20:04 +0000)]
NEWS.md: interim update

15 months agodocs: simplify description of shell wildcard patterns
Johan Malm [Sun, 1 Dec 2024 16:35:57 +0000 (16:35 +0000)]
docs: simplify description of shell wildcard patterns

...to align with glob(7) language

Reported-by: @vyivel
15 months agossd: fix pixman error when SSD is created for tiny windows
tokyo4j [Mon, 18 Nov 2024 22:18:36 +0000 (07:18 +0900)]
ssd: fix pixman error when SSD is created for tiny windows

set_squared_corners(false) was always called when titlebar is created.
However, set_squared_corners(false) sets the width of the titlebar
background buffer to (view width) - (corner radius), which causes pixman
errors due to the negative width set for titlebar background buffer when
the view is so small.

15 months agoCI: disable clang for Debian until they get wayland 1.23.1
Consolatis [Sun, 1 Dec 2024 18:46:24 +0000 (19:46 +0100)]
CI: disable clang for Debian until they get wayland 1.23.1

15 months agoscaled-rect-buffer: add missing cairo_surface_flush()
tokyo4j [Thu, 28 Nov 2024 09:49:04 +0000 (18:49 +0900)]
scaled-rect-buffer: add missing cairo_surface_flush()

15 months agobuffer: remove buffer->cairo
tokyo4j [Wed, 27 Nov 2024 21:58:17 +0000 (06:58 +0900)]
buffer: remove buffer->cairo

It's more common for cairo_t to have a temporary lifetime and it will
prevent accidentally reusing its previous state.

15 months agobuffer: always set buffer->{cairo,surface} for simplification
tokyo4j [Wed, 27 Nov 2024 05:17:28 +0000 (14:17 +0900)]
buffer: always set buffer->{cairo,surface} for simplification

15 months agoAdd lsan.supp
Johan Malm [Tue, 12 Nov 2024 17:50:58 +0000 (17:50 +0000)]
Add lsan.supp

...so suppress errors from ASAN with EGL renderer.

Also add a script to simplify running with sanitizer and this suppression
file.

Related-to: #2331
15 months agokeyboard: add window rule to send release-events (#2377)
Johan Malm [Tue, 26 Nov 2024 20:02:36 +0000 (20:02 +0000)]
keyboard: add window rule to send release-events (#2377)

...of modifiers which are part of keybinds. This supports clients (for
example blender) that want to see modifier-release-events even if they are
part of a keybinds.

Most clients (including those using Qt and GTK) are setup to not see these
modifier release events and actually misbehave if they do.  For example
Firefox shows the menu bar if alt is pressed and then released, whereas if
only pressed (because the release is absorbed) nothing happens. So, if
Firefox saw bound modifier-release-events it would show the menu bar every
time the window-switcher is used with alt-tab.

    <windowRules>
      <windowRule identifier="blender" wantAbsorbedModifierReleaseEvents="yes"/>
    </windowRules>

Issue #1507

15 months agoCI: make the smoke test start foot
Consolatis [Tue, 26 Nov 2024 03:30:38 +0000 (04:30 +0100)]
CI: make the smoke test start foot

15 months agoCI: switch runtime tests to Arch to reduce total runtime
Consolatis [Tue, 26 Nov 2024 05:02:29 +0000 (06:02 +0100)]
CI: switch runtime tests to Arch to reduce total runtime

15 months agoCI: add address sanitizer to Debian runtime tests
Consolatis [Tue, 26 Nov 2024 02:08:07 +0000 (03:08 +0100)]
CI: add address sanitizer to Debian runtime tests

15 months agoCI: re-enable Debian build job
Consolatis [Tue, 26 Nov 2024 01:24:38 +0000 (02:24 +0100)]
CI: re-enable Debian build job

15 months agoCI: move comment to the right place
Consolatis [Tue, 26 Nov 2024 01:19:38 +0000 (02:19 +0100)]
CI: move comment to the right place

15 months agoCI: reduce job timeout to 10 minutes
Consolatis [Tue, 26 Nov 2024 01:17:10 +0000 (02:17 +0100)]
CI: reduce job timeout to 10 minutes

Since GitHub runners now support hardware virtualization,
the maximal runtime of the FreeBSD runner is somewhere
around 3 to 6 minutes. It may still fail sometimes so
keep the timeout parameter around.

15 months agographic-helpers: fix segfault when medium-size icon file is loaded
tokyo4j [Tue, 26 Nov 2024 01:56:10 +0000 (10:56 +0900)]
graphic-helpers: fix segfault when medium-size icon file is loaded

lab_data_buffer->logical_{width,height} are not the actual size of the
backing buffer, so wlr_buffer.{width,height} should be used when
duplicating it in get_cairo_surface_from_lab_data_buffer().

This mistake caused segfault when an icon file 1~2 times larger than
window.button.{width,height} is loaded, because the buffer for the raw
icon file is reused by setting lab_data_buffer->logical_{width,height}
with the size for display which is different from
wlr_buffer.{width,height} (see buffer_convert_cairo_surface_for_icon()),
and it is duplicated with get_cairo_surface_from_lab_data_buffer() for
hovered/rounded variants of titlebar button.

15 months agomenu: don't include menu.border.width for menu title height
tokyo4j [Tue, 26 Nov 2024 00:44:27 +0000 (09:44 +0900)]
menu: don't include menu.border.width for menu title height

It was a cruft from my experiment of adding borders around titles.

It even caused an integer overflow because theme->menu_border_width can be
INT_MIN when menu_header_height is calculated.

15 months agomenu: invert the y-offset of submenus applied by menu.overlap.y
tokyo4j [Mon, 25 Nov 2024 21:04:29 +0000 (06:04 +0900)]
menu: invert the y-offset of submenus applied by menu.overlap.y

This follows Openbox's behavior.

15 months agomenu: overlap submenus by menu.border.width
tokyo4j [Sun, 24 Nov 2024 05:40:52 +0000 (14:40 +0900)]
menu: overlap submenus by menu.border.width

This follows Openbox's behavior that aligns the first item of a submenu
with its parent item

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