]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
18 months agossd: add titleLayout setting
Tobias Bengfort [Sat, 17 Aug 2024 12:45:25 +0000 (14:45 +0200)]
ssd: add titleLayout setting

18 months agossd: do not draw background for individual buttons
Tobias Bengfort [Sat, 17 Aug 2024 12:46:35 +0000 (14:46 +0200)]
ssd: do not draw background for individual buttons

18 months agoscene-helpers: use pending_commit_damage, chases wlr!4253
Consolatis [Wed, 14 Aug 2024 18:17:50 +0000 (20:17 +0200)]
scene-helpers: use pending_commit_damage, chases wlr!4253

Using the output damage_ring for early out will break VRR in
direct scanout mode. The reason being that the damage_ring
will be completely ignored in that mode so we need to check
`output->pending_commit_damage` instead. This matches with
what wlroots has been doing since [0] and it was missed in
the initial port to wlroots 0.18.x.

However, that would then break the magnifier which only adds
its damage to the damage ring. After some discussion with
the wlroots devs we came up with a solution that should work
for both, wlroots 0.18.0 and when [1] is backported to 0.18.1.

Note that even with this PR, VRR in direct scanout mode is
broken in 0.18.0 from the wlroots side and will be fixed once
[1] is backported to the 0.18 branch and 0.18.1 is released.

Fixes: #2078
[0] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4253
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4753

18 months agoinput: ensure that our own tablet structs are created
Jens Peters [Sat, 10 Aug 2024 05:05:05 +0000 (07:05 +0200)]
input: ensure that our own tablet structs are created

18 months agoinput: move cursor event listeners from tablet to seat
Jens Peters [Fri, 9 Aug 2024 07:25:00 +0000 (09:25 +0200)]
input: move cursor event listeners from tablet to seat

Otherwise we would subscribe multiple times to the
same event when having multiple tablets.

18 months agoinput: use CONNECT_SIGNAL macro
Jens Peters [Fri, 9 Aug 2024 07:22:28 +0000 (09:22 +0200)]
input: use CONNECT_SIGNAL macro

18 months agoxdg: fix error when launching windowed Chromium
tokyo4j [Sun, 21 Jul 2024 08:09:17 +0000 (17:09 +0900)]
xdg: fix error when launching windowed Chromium

Chromium sends 2 commits before the commit with a buffer attached. We
were just checking `wlr_box_empty(&view->pending)` to handle the cases
where an initially maximized/fullscreen client is windowed, but that
check was also returning true on the 2nd commit from Chromium, resulting
in an error message: "view has empty geometry, not centering".

18 months agoxdg-activation: temporarily disable source surface verification
tokyo4j [Fri, 9 Aug 2024 06:56:26 +0000 (15:56 +0900)]
xdg-activation: temporarily disable source surface verification

71451173 validates the xdg-activation token more strictly by verifying
the source surface attached to the token. That  improves the security by
preventing arbitrary focus-stealing.

However, not all clients attach a right source surface to the token or
use the received token for activation. For example, when a notification
client requests thunderbird to activate its window, thunderbird doesn't
use the token passed by the notification client and instead use their own
token, thus the activation is rejected as the surface attached to the
token is not focused.

We will add options to configure the policy for activation requests or
implement urgency hint in some way in the future and reland the source
surface verification.

18 months agokeyboard: fix bug with empty XKB_DEFAULT_LAYOUT
Johan Malm [Thu, 8 Aug 2024 19:14:23 +0000 (20:14 +0100)]
keyboard: fix bug with empty XKB_DEFAULT_LAYOUT

With XKB_DEFAULT_LAYOUT= (set to empty rather than unset) the keyboard
just does not work.

Ref: https://github.com/labwc/labwc-tweaks/issues/89

18 months agoinput: apply tablet rotation before area transformation
Jens Peters [Thu, 8 Aug 2024 18:01:37 +0000 (20:01 +0200)]
input: apply tablet rotation before area transformation

This makes the behavior consistent with auto-rotation
as a result of output mapping.

18 months agodocs: clarify tablet rotation for mapped outputs
Jens Peters [Thu, 8 Aug 2024 16:09:07 +0000 (18:09 +0200)]
docs: clarify tablet rotation for mapped outputs

18 months agoinput: subscribe to tablet tool events from cursor
Jens Peters [Thu, 8 Aug 2024 15:46:20 +0000 (17:46 +0200)]
input: subscribe to tablet tool events from cursor

Contrary to the raw tablet events, the cursor events transform
the coordinates based on a mapped output orientation.
Otherwise those events are the same.

18 months agoRename <snapping><dragResistance> to <resistance><unSnapThreshold>
tokyo4j [Thu, 8 Aug 2024 00:19:52 +0000 (09:19 +0900)]
Rename <snapping><dragResistance> to <resistance><unSnapThreshold>

As we already have <resistance><{screen,window}EdgeStrength>,
<resistance> will be a better place for this setting.

18 months agoNEWS.md: interim update
Johan Malm [Wed, 7 Aug 2024 20:01:30 +0000 (21:01 +0100)]
NEWS.md: interim update

19 months agotearing: add fullscreen options (#1941)
Jens Peters [Tue, 6 Aug 2024 20:23:10 +0000 (22:23 +0200)]
tearing: add fullscreen options (#1941)

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
19 months agolabwc-config(5): minor refactor to fix pandoc rendering
Johan Malm [Tue, 6 Aug 2024 18:49:44 +0000 (19:49 +0100)]
labwc-config(5): minor refactor to fix pandoc rendering

19 months agokeybind: implement allowWhenLocked
Tobias Bengfort [Fri, 2 Aug 2024 12:08:19 +0000 (14:08 +0200)]
keybind: implement allowWhenLocked

fixes #2034

see https://github.com/swaywm/sway/blob/bc258a3be2f946c1c93bcbe40735b2db068e0ea8/sway/sway.5.scd?plain=1#L409

19 months agodocs: integrate onRelease into keybind
Tobias Bengfort [Fri, 2 Aug 2024 12:05:18 +0000 (14:05 +0200)]
docs: integrate onRelease into keybind

19 months agoview: stay fullscreen when view's output is disconnected
John Lindgren [Fri, 2 Aug 2024 02:15:27 +0000 (22:15 -0400)]
view: stay fullscreen when view's output is disconnected

I intended to fix this quite some time ago but didn't get around to it.

I don't think there's any good reason why we need to un-fullscreen a
view when its output is disconnected. We can handle it the same as a
maximized view, and move it to a new output (remaining fullscreen) or,
if all outputs are disconnected, just leave it as-is.

This is helpful for a media-center use-case, where you have just one
view (e.g. Kodi) fullscreen all the time, but the TV might appear to be
disconnected if you switch it to a different source.

Tested with a couple different scenarios:

1. Single output disconnected and re-connected: view stayed fullscreen.
2. Secondary output disconnected: view stayed fullscreen but moved to
   the primary output, and the layer-shell panel on that output was
   hidden as expected. When the secondary output was re-connected, the
   view was moved back (still fullscreen) and the panel on the primary
   appeared again.

Fixes: #864
19 months agoCI: Install libwlroots-0.18-dev for the Debian runner
Consolatis [Tue, 6 Aug 2024 13:18:00 +0000 (15:18 +0200)]
CI: Install libwlroots-0.18-dev for the Debian runner

19 months agoxdg: account for drag resistance in do_late_positioning()
John Lindgren [Sat, 3 Aug 2024 00:18:21 +0000 (20:18 -0400)]
xdg: account for drag resistance in do_late_positioning()

The position where the view should be anchored can now be slightly
different from the current cursor position.

Addresses a TODO from #2009.

19 months agoCI: increase speed of codestyle check
Consolatis [Sat, 3 Aug 2024 03:30:02 +0000 (05:30 +0200)]
CI: increase speed of codestyle check

by running up to nproc ones in parallel

19 months agoAdd resistance when dragging tiled windows
tokyo4j [Sat, 20 Jul 2024 07:58:39 +0000 (16:58 +0900)]
Add resistance when dragging tiled windows

Adds a config option <snapping><dragResistance> with default value 20.
This prevents tiled/maximized windows from being unintentionally untiled.

19 months agomultirect: remove destroy listener before freeing
Consolatis [Wed, 24 Jul 2024 16:09:53 +0000 (18:09 +0200)]
multirect: remove destroy listener before freeing

Detected by `-Db_sanitize=address,undefined` for libwayland

19 months agoNEWS.md: update for 0.7.4
Johan Malm [Fri, 19 Jul 2024 20:59:13 +0000 (21:59 +0100)]
NEWS.md: update for 0.7.4

19 months agosrc/xdg-popup.c: take into account CSD borders for unconstraining
tokyo4j [Mon, 22 Jul 2024 07:20:17 +0000 (16:20 +0900)]
src/xdg-popup.c: take into account CSD borders for unconstraining

wlr_xdg_popup_unconstrain_from_box() takes a constraint box relative to
toplevel surface, not window.

19 months agosrc/xdg-popup.c: choose output depending on xdg-positioner
tokyo4j [Sat, 20 Jul 2024 17:33:51 +0000 (02:33 +0900)]
src/xdg-popup.c: choose output depending on xdg-positioner

wlr_popup->current.geometry.{x,y} are usually zero on initial commit, so
xdg-popups were always unconstrained against the output which contains
the top-left of the parent toplevel.

This commit changes xdg-popups to be unconstrained against the output
which contains the top-left of preliminary popup geometry designated by
xdg-positioner given as an argument of "get_popup" or "reposition"
requests.

19 months agolayer-shell: stop sending configure events on surface creation
tokyo4j [Tue, 23 Jul 2024 10:09:48 +0000 (19:09 +0900)]
layer-shell: stop sending configure events on surface creation

With wlroots 0.18, layer-shell's new_surface event is emitted on
zwlr_layer_shell_v1.get_layer_surface request rather than the first
commit. This change layer-shell clients like fuzzel to flicker on launch
because labwc was sending a configure event with fullscreen geometry due
to the absence of geometry hints on get_layer_surface requests.

This commit removes the code that updates the usable area from
new_surface handler, preventing unintended configure events with
fullscreen geometry.

19 months agobackend/drm: Implement support for renderer loss recovery
Christopher Snowhill [Thu, 18 Jul 2024 00:13:51 +0000 (17:13 -0700)]
backend/drm: Implement support for renderer loss recovery

This implementation is nearly identical to Sway's, except that
it also reloads the configuration, to spur on reloading the
server-side decorations.

v2: Fix style.
v3: Add a reset to the magnifier.
v4: Oops, restructure reset handler a bit.
v5: Commit the magnifier reset immediately, before freeing the
    lost allocator and renderer.
v6: Also check for failed render pass, which may return NULL.
v7: Add a second NULL test, just in case.

19 months agosrc/ssd/ssd.c: fix incorrect condition in ssd_part_contains()
tokyo4j [Tue, 23 Jul 2024 08:52:42 +0000 (17:52 +0900)]
src/ssd/ssd.c: fix incorrect condition in ssd_part_contains()

19 months agoxdg: remove useless view_set_ssd_mode() in xdg_toplevel_new()
John Lindgren [Sat, 20 Jul 2024 02:10:24 +0000 (22:10 -0400)]
xdg: remove useless view_set_ssd_mode() in xdg_toplevel_new()

The desired SSD mode is not known at this point. When it is known,
kde-deco/xdg-deco will call view_set_ssd_mode() themselves.

19 months agoxdg: update initial maximize logic for wlroots 0.18
John Lindgren [Fri, 19 Jul 2024 23:22:56 +0000 (19:22 -0400)]
xdg: update initial maximize logic for wlroots 0.18

The initial configure event is now sent explicitly by labwc rather
than by wlroots. We need to move the maximize/fullscreen logic to
the initial commit handling accordingly.

Updates #1956, fixes #1994, replaces #1995.

19 months agoedges.c: fix flicker of snapped windows in nested session
tokyo4j [Tue, 23 Apr 2024 17:01:07 +0000 (02:01 +0900)]
edges.c: fix flicker of snapped windows in nested session

Fixes: #1621
19 months agooutput: allow tearing with atomic mode setting
Christopher Snowhill [Thu, 18 Jul 2024 00:10:04 +0000 (17:10 -0700)]
output: allow tearing with atomic mode setting

Additionally, track errors and abandon the tearing allowance when it
cannot be set for two-seconds' worth of consecutive frames.

19 months agoxwayland: support xinitrc scripts to configure server on launch (#1963)
Andrew J. Hesford [Sat, 20 Jul 2024 08:40:11 +0000 (04:40 -0400)]
xwayland: support xinitrc scripts to configure server on launch (#1963)

19 months agotheme: allow to set window button size (#1965)
Consus [Sat, 20 Jul 2024 08:33:57 +0000 (11:33 +0300)]
theme: allow to set window button size (#1965)

This commit introduces new option "window.button.width". Despite the name
it currently affects both width and height.

19 months agoview: implement `cascade` placement policy
tokyo4j [Fri, 3 May 2024 21:26:27 +0000 (06:26 +0900)]
view: implement `cascade` placement policy

Adds following settings:
<placement>
  <policy>cascade</policy>
  <cascadeOffset x="40" y="30" />
</placement>

"Cascade" policy places a new window at the center of the screen like
"center" policy, but possibly shifts its position to bottom-right so the
new window doesn't cover existing windows.

The algorithm is copied from KWin's implementation:
https://github.com/KDE/kwin/blob/df9f8f8346b5b7645578e37365dabb1a7b02ca5a/src/placement.cpp#L589

Also added some helper functions to manipulate `wlr_box`.

19 months agoxdg: handle initially maximized xdg-shell views better
John Lindgren [Tue, 2 Jul 2024 11:24:29 +0000 (07:24 -0400)]
xdg: handle initially maximized xdg-shell views better

Currently, initially maximized (or fullscreen) xdg-shell views exhibit
one of two issues:

 - some (e.g. GTK and Qt apps) paint an initial frame un-maximized
   (before the "map" event) and only maximize in a later commit

 - others (e.g. foot) maximize immediately without flicker, but never
   store a valid natural size, so we end up using a fallback (640x480)

Under KWin, neither of these issues occur, so I looked into what labwc
is doing wrong. It seems that:

 - wlroots internally sends an initial configure event with a size of
   0x0 to all xdg-shell views. This requests the client to set its own
   preferred (a.k.a. natural) size.

 - For an initially maximized/fullscreen view, the initial configure
   event should contain the maximized/fullscreen size rather than 0x0.
   In labwc, this means we have to call wlr_xdg_toplevel_set_size()
   earlier, i.e. from the new_surface event. Tracing with WAYLAND_DEBUG
   shows that the initial configure event now has the correct geometry,
   matching KWin behavior. With this change, GTK and Qt apps no longer
   paint an incorrect un-maximized frame.

 - However, this means that all xdg-shell views now suffer from the same
   issue as foot, where we never receive a commit with the un-maximized
   (natural) geometry. The correct way to get the natural geometry seems
   to be to wait until we want to un-maximize, and send a configure
   event of 0x0 at that point.

Sending a configure event of 0x0 when un-maximizing is a bit annoying as
it breaks some assumptions in labwc code. In particular:

 - view->natural_geometry may now be unknown (0x0), requiring various
   wlr_box_empty() checks sprinkled around. I added these in all the
   obvious places, but there could be some code paths that I missed.

 - Positioning the newly un-maximized view within view_maximize() no
   longer works since we don't know the natural size. Instead we have to
   run the positioning logic from the surface commit handler. This
   results in some extra complexity, especially for interactive move.
   See the new do_late_positioning() function in xdg.c.

Some TODOs/FIXMEs (non-blocking in my opinion):

 - The view_wants_decorations() check is now duplicated in both the
   new_surface and map event handlers. I'm not sure if this is necessary
   but it seemed like the safest approach for now. More testing would be
   nice, particularly with various combinations of config and client SSD
   preferences.

 - Aside from the interactive move case, the "late positioning" logic
   always centers the view when un-maximizing, and does not invoke any
   of the smart placement logic. If we want to invoke smart placement
   here, I'd appreciate someone with more knowledge of that code to take
   a look and figure out how to do that correctly.

19 months agodocs: add tablet tool section
Jens Peters [Mon, 8 Jul 2024 18:21:49 +0000 (20:21 +0200)]
docs: add tablet tool section

19 months agoinput: log tablet pad capabilities
Jens Peters [Mon, 8 Jul 2024 16:15:25 +0000 (18:15 +0200)]
input: log tablet pad capabilities

19 months agoinput: support tablet tool motion sensitivity configuration
Jens Peters [Fri, 5 Jul 2024 04:33:26 +0000 (06:33 +0200)]
input: support tablet tool motion sensitivity configuration

19 months agoconfig: add configuration for tablet tool motion sensitivity
Jens Peters [Fri, 5 Jul 2024 04:32:28 +0000 (06:32 +0200)]
config: add configuration for tablet tool motion sensitivity

19 months agoinput: support tablet tool motion configuration
Jens Peters [Fri, 5 Jul 2024 04:17:39 +0000 (06:17 +0200)]
input: support tablet tool motion configuration

19 months agoconfig: add configuration for tablet tool motion
Jens Peters [Fri, 5 Jul 2024 04:17:29 +0000 (06:17 +0200)]
config: add configuration for tablet tool motion

19 months agoinput: support tablet tools with relative motion
Jens Peters [Fri, 5 Jul 2024 04:09:37 +0000 (06:09 +0200)]
input: support tablet tools with relative motion

19 months agoinput: fix rotation for tilt
Jens Peters [Fri, 5 Jul 2024 04:05:35 +0000 (06:05 +0200)]
input: fix rotation for tilt

The transformation for relative coordinates
is different than for absolute coordinates.

19 months agoinput: add relative cursor move emulation
Jens Peters [Wed, 3 Jul 2024 19:14:43 +0000 (21:14 +0200)]
input: add relative cursor move emulation

19 months agoxwayland: set initial geometry in map_request handler
John Lindgren [Tue, 13 Feb 2024 00:52:36 +0000 (19:52 -0500)]
xwayland: set initial geometry in map_request handler

Set the initial geometry of maximized/fullscreen views before
actually mapping them, so that they can do their initial layout and
drawing with the correct geometry. This avoids visual glitches and
also avoids undesired layout changes with some apps (e.g. HomeBank).

Fixes: #1320
v2: ensure valid geometry for unmanaged->managed case

19 months agoDisable pango glyph position rounding
Johan Malm [Sun, 14 Jul 2024 07:55:30 +0000 (08:55 +0100)]
Disable pango glyph position rounding

Chase https://github.com/swaywm/sway/commit/8c5b23e592d2334b3324227dd9d1311e46c5fd69

Pango rounds glyph position and widths to nearest integer, which leads to
font dimensions jumping around when rendering with a scale, causing text
geometry to jump around when changing scale.

Disable this rounding to make the geometry stable.

19 months agossd: make borders respect snapped state on Reconfigure
Consolatis [Fri, 19 Jul 2024 19:45:24 +0000 (21:45 +0200)]
ssd: make borders respect snapped state on Reconfigure

Fixes: #1862
19 months agoconfig: initialize some missing defaults
Christopher Snowhill [Thu, 18 Jul 2024 01:01:15 +0000 (18:01 -0700)]
config: initialize some missing defaults

19 months agomagnifier: disable direct scanout when active
Consolatis [Tue, 16 Jul 2024 18:39:48 +0000 (20:39 +0200)]
magnifier: disable direct scanout when active

Fixes: #1980
19 months agoCI: switch Arch and FreeBSD to wlroots 0.18
Consolatis [Wed, 17 Jul 2024 15:49:01 +0000 (17:49 +0200)]
CI: switch Arch and FreeBSD to wlroots 0.18

Also add wlroots0.18-devel to Void, assuming that is what the
package will be called once available. For previous packaging
see https://github.com/void-linux/void-packages/pull/48323/files

19 months agochase: wlroots.wrap: track the wlroots 0.18 branch
Consolatis [Sat, 13 Jul 2024 15:46:39 +0000 (17:46 +0200)]
chase: wlroots.wrap: track the wlroots 0.18 branch

19 months agochase: move to stable tablet protocol and require w-p >= 1.35
Consolatis [Sat, 29 Jun 2024 19:05:02 +0000 (21:05 +0200)]
chase: move to stable tablet protocol and require w-p >= 1.35

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4645

19 months agochase: version pkgconfig, headers, and library
Consolatis [Mon, 27 May 2024 23:52:04 +0000 (01:52 +0200)]
chase: version pkgconfig, headers, and library

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4614

19 months agochase: tablet_pad to tablet
Consolatis [Mon, 18 Mar 2024 23:22:44 +0000 (00:22 +0100)]
chase: tablet_pad to tablet

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4585

19 months agochase: use wayland pointer enums rather than wlr ones
Consolatis [Tue, 19 Mar 2024 00:32:05 +0000 (01:32 +0100)]
chase: use wayland pointer enums rather than wlr ones

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575

19 months agochase: request initial configure
Consolatis [Tue, 23 Apr 2024 21:37:08 +0000 (23:37 +0200)]
chase: request initial configure

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4396

19 months agochase: backend create now requires event_loop arg
Consolatis [Tue, 19 Mar 2024 00:47:23 +0000 (01:47 +0100)]
chase: backend create now requires event_loop arg

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4443

19 months agochase: output->pending
Consolatis [Mon, 18 Mar 2024 22:53:38 +0000 (23:53 +0100)]
chase: output->pending

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4202

19 months agochase: relative axis direction
Consolatis [Tue, 19 Mar 2024 00:05:35 +0000 (01:05 +0100)]
chase: relative axis direction

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4003

19 months agochase: presentation is now handled internally
Consolatis [Tue, 19 Mar 2024 00:31:23 +0000 (01:31 +0100)]
chase: presentation is now handled internally

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4482

19 months agochase: tearing hint
Consolatis [Mon, 18 Mar 2024 23:19:24 +0000 (00:19 +0100)]
chase: tearing hint

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4480

19 months agochase: let wlr_scene track damage again
Consolatis [Tue, 23 Apr 2024 20:01:35 +0000 (22:01 +0200)]
chase: let wlr_scene track damage again

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4253

19 months agochase: handle xdg new toplevel event
Consolatis [Tue, 19 Mar 2024 01:38:09 +0000 (02:38 +0100)]
chase: handle xdg new toplevel event

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4345

19 months agochase: move xdg destroy signal to toplevel / popup
Consolatis [Mon, 27 May 2024 13:55:46 +0000 (15:55 +0200)]
chase: move xdg destroy signal to toplevel / popup

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4345

19 months agochase: output-layout takes wl_display in constructor
Consolatis [Mon, 18 Mar 2024 22:55:37 +0000 (23:55 +0100)]
chase: output-layout takes wl_display in constructor

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4310

19 months agochase: disable restacking of unmanaged windows
Consolatis [Tue, 23 Apr 2024 23:52:23 +0000 (01:52 +0200)]
chase: disable restacking of unmanaged windows

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4052

19 months agochase: input inhibit removal
Consolatis [Mon, 18 Mar 2024 23:32:47 +0000 (00:32 +0100)]
chase: input inhibit removal

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4440

19 months agochase: wlroots version dep to 0.18
Consolatis [Mon, 18 Mar 2024 22:53:54 +0000 (23:53 +0100)]
chase: wlroots version dep to 0.18

19 months agomenu: fix crash triggered by pipemenu without parent <menu>
Johan Malm [Mon, 15 Jul 2024 20:47:10 +0000 (21:47 +0100)]
menu: fix crash triggered by pipemenu without parent <menu>

...such as the one in the example below:

    <?xml version="1.0" encoding="UTF-8"?>
    <openbox_menu>
      <menu id="root-menu" label="obmenu-generator" execute="obmenu-generator"/>
    </openbox_menu>

We should consider supporting this construct in future.

Reported-by: cry0xen via IRC
19 months agosrc/xdg.c: verify source surface for xdg_activation request
Consolatis [Wed, 10 Jul 2024 18:22:52 +0000 (20:22 +0200)]
src/xdg.c: verify source surface for xdg_activation request

wlroots < 0.17 didn't allow to reliably check the source surface of
an xdg activation request as it reset the surface to NULL when it
was destroyed before the token was used. This happens regularly for
notifications for example. Thus we treated the token as valid even
without checking for the source surface.

wlroots 0.17 added a new_token signal where we can attach information
to the existing token which we can then use when evaluating activation
requests. This patch implements that check.

19 months agoCI: add wlroots 0.17 packages for Arch and FreeBSD
Consolatis [Sun, 14 Jul 2024 19:09:44 +0000 (21:09 +0200)]
CI: add wlroots 0.17 packages for Arch and FreeBSD

19 months agodocs: fix typo in labwc-config.5.scd
Birger Schacht [Sat, 13 Jul 2024 12:14:22 +0000 (14:14 +0200)]
docs: fix typo in labwc-config.5.scd

19 months agobuild: bump version to 0.7.3
Johan Malm [Fri, 12 Jul 2024 16:23:47 +0000 (17:23 +0100)]
build: bump version to 0.7.3

19 months agoNEWS.md: update for 0.7.3
Johan Malm [Mon, 8 Jul 2024 19:09:00 +0000 (20:09 +0100)]
NEWS.md: update for 0.7.3

19 months agoTranslation updates from weblate
Weblate [Wed, 3 Jul 2024 08:01:16 +0000 (10:01 +0200)]
Translation updates from weblate

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: tark1998 <tark1998@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ko/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/nl/
Translation: Labwc/labwc

19 months agomenu: fix small memory leaks
John Lindgren [Mon, 8 Jul 2024 15:09:20 +0000 (11:09 -0400)]
menu: fix small memory leaks

19 months agomenu: try other paths (and fix memory leak) if fopen() fails
John Lindgren [Mon, 8 Jul 2024 15:04:57 +0000 (11:04 -0400)]
menu: try other paths (and fix memory leak) if fopen() fails

19 months agotheme: fix memory leak of button icons
John Lindgren [Mon, 8 Jul 2024 14:56:20 +0000 (10:56 -0400)]
theme: fix memory leak of button icons

20 months agosession-lock: clear focused surface on lock
tokyo4j [Tue, 2 Jul 2024 15:16:30 +0000 (00:16 +0900)]
session-lock: clear focused surface on lock

Before this commit, keyboard events were sent to the focused surface
before the session-lock client maps its surfaces.

20 months agosession-lock: restore focused view on unlock
tokyo4j [Tue, 2 Jul 2024 13:33:47 +0000 (22:33 +0900)]
session-lock: restore focused view on unlock

Before this commit, the topmost view is focused on unlock. This commit
changes it to remember the focused view on lock then restore it on
unlock.

20 months agosession-lock: never allow multiple session-locks
tokyo4j [Tue, 2 Jul 2024 13:04:02 +0000 (22:04 +0900)]
session-lock: never allow multiple session-locks

I forgot to set session_lock_manager->lock, so it was always NULL.
This barely worked, but allowed multiple session-locks and conflicted
with comments in session-lock.h.

20 months agosession-lock: refactor
tokyo4j [Tue, 2 Jul 2024 13:03:45 +0000 (22:03 +0900)]
session-lock: refactor

No changes in logic.

20 months agosession-lock: remove cruft
tokyo4j [Tue, 2 Jul 2024 13:01:30 +0000 (22:01 +0900)]
session-lock: remove cruft

The color to fill screen with is always black and we don't need reset
its color on every session-lock destruction.

20 months agoxwayland: allow persistence
Andrew J. Hesford [Wed, 3 Jul 2024 17:43:04 +0000 (13:43 -0400)]
xwayland: allow persistence

Closes: #1958.
20 months agoRemove subprojects/seatd.wrap as no longer needed
Johan Malm [Tue, 2 Jul 2024 19:51:51 +0000 (20:51 +0100)]
Remove subprojects/seatd.wrap as no longer needed

20 months agossd/ssd-shadow.c: fix memory leak
Consolatis [Tue, 2 Jul 2024 18:49:53 +0000 (20:49 +0200)]
ssd/ssd-shadow.c: fix memory leak

Before this patch, we were leaking memory [0] because the
shadow implementation did not free the ssd_parts on destruction.

There was also no check if shadows were actually enabled via
rc.xml or not so this also impacted people who were not using
shadows but were not setting the shadow size via their theme to 0.

[0] 44 bytes per ssd_part * 8 parts * 2 states == 704 bytes per
view closed. Note that Reconfigure also re-creates the SSD, thus
we were also leaking 704 bytes * nr_views per Reconfigure.

20 months agoxdg: support xdg-shell v3 with popup repositioning
John Lindgren [Thu, 27 Jun 2024 23:17:38 +0000 (19:17 -0400)]
xdg: support xdg-shell v3 with popup repositioning

See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514
which added support on the wlroots side.

We now re-run popup positioning (for both xdg-shell and layer-shell
popups) when the "reposition" event is received. This allows popups that
change size (such as qmpanel's applications menu) to be positioned
correctly.

xdg-shell v3 also gives the compositor some additional "hints" for popup
positioning (reactive, parent_size, and parent_configure_serial) which
are available but we don't make use of currently.

20 months agomagnifier: fix flickering on simultaneous gamma changes
Consolatis [Mon, 17 Jun 2024 14:36:07 +0000 (16:36 +0200)]
magnifier: fix flickering on simultaneous gamma changes

Gamma changes take another code path and thus did not
render the magnifier. This patch consalidates both
code paths and therefore also renders the magnifier on
gamma changes.

Fixes: #1905
20 months agomenu: support menu.overlap.x with pipemenus
Johan Malm [Fri, 28 Jun 2024 17:27:43 +0000 (18:27 +0100)]
menu: support menu.overlap.x with pipemenus

No inteded functional change intended with refactoring of
get_submenu_position().

Fixes #1870

20 months agoview: don't try to restore to very small width/height on unmaximize
tokyo4j [Wed, 19 Jun 2024 02:48:39 +0000 (11:48 +0900)]
view: don't try to restore to very small width/height on unmaximize

Thonny (Python IDE made with Tk) may set the window geometry to 1x1 and
maximizes the window before mapping. This set `view->natural_geometry`
to 1x1, so labwc tried to restore the window geometry to it on
unmaximize, causing validation errors in `ssd_update_geometry()` as its
width and height are smaller than `LAB_MIN_VIEW_{WIDTH,HEIGHT}`.

This commit fixes it by not allowing geometries smaller than
`LAB_MIN_VIEW_{WIDTH,HEIGHT}` in `view->natural_geometry`.

20 months agossd: set squared corners for tiled views conditionally
Jens Peters [Sat, 22 Jun 2024 21:40:19 +0000 (23:40 +0200)]
ssd: set squared corners for tiled views conditionally

Respect the snapping settings for notify-client.

20 months agossd: extend border over squared corners
Jens Peters [Sat, 22 Jun 2024 21:27:37 +0000 (23:27 +0200)]
ssd: extend border over squared corners

20 months agossd: show squared corners when the view is tiled
Jens Peters [Sat, 22 Jun 2024 13:12:12 +0000 (15:12 +0200)]
ssd: show squared corners when the view is tiled

20 months agoaction: remember initial direction of PreviousView
droc12345 [Wed, 26 Jun 2024 21:03:56 +0000 (16:03 -0500)]
action: remember initial direction of PreviousView

...when cycling windows. Also make the toggling of direction when shift
is pressed relative to the initial direction. For example if W-j is
bound to PreviousWindow, subsequent key presses will continue to
cycle backwards unless shift if pressed.

Add documentation for using shift/arrow keys in Next/Previous

20 months agoRemove fuzzy for capitalized translations
stefonarch [Tue, 25 Jun 2024 11:01:45 +0000 (13:01 +0200)]
Remove fuzzy for capitalized translations

20 months agodnd: show dnd icon above layer-shell surfaces
tokyo4j [Tue, 25 Jun 2024 12:20:12 +0000 (21:20 +0900)]
dnd: show dnd icon above layer-shell surfaces

20 months agoTranslation updates from weblate
Weblate [Mon, 24 Jun 2024 19:19:25 +0000 (21:19 +0200)]
Translation updates from weblate

Co-authored-by: Abdullah Albaroty <albaroty@gmail.com>
Co-authored-by: Jan Rolski <wbcwknvstb@proton.me>
Co-authored-by: Priit Jõerüüt <lxqtwlate@joeruut.com>
Co-authored-by: Standreas <standreas@riseup.net>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/ar/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/de/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/et/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/it/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pl/
Translation: Labwc/labwc