John Lindgren [Sat, 2 Jul 2022 17:18:31 +0000 (13:18 -0400)]
(Partly) fix handling of client-initiated configure requests
- Add missing call to wlr_scene_node_set_position() in
unmanaged_handle_commit() -- this fixes moving unmanaged XWayland
windows.
- Update view->pending_move_resize when we receive a configure request
for a managed XWayland surface -- this fixes moving managed but
undecorated XWayland windows.
- Also update view->pending_move_resize when we move a surface while a
configure request is already pending -- this fixes a discrepancy
between displayed and actual position for XWayland windows that try to
set their own initial position, but then get overridden by labwc's
positioning.
Moving undecorated XWayland windows is still really glitchy -- it appears
that an XWayland window gets sent incorrect mouse motion coordinates when
there is a pending configure request moving the window itself.
Consus [Tue, 28 Jun 2022 19:47:48 +0000 (22:47 +0300)]
Fix usable area calculation
Currently if a surface with exclusive zone is created prior to regular
surfaces, the size of the exclusize zone does not affect the usable area
for regular surfaces. This for example results in notifications being
rendered over the statusbar.
This commit fixes the issue by handling the surfaces with exclusive
zones first.
Consus [Sat, 18 Jun 2022 00:09:18 +0000 (03:09 +0300)]
workspaces: Allow switching/sending to the last used workspace
Actions GoToDesktop and SendToDesktop now support the new direction
called "last" that corresponds to the last used workspace (see Openbox
help[1] for reference).
Consolatis [Wed, 8 Jun 2022 12:37:30 +0000 (14:37 +0200)]
src/ssd: Use LAB_SSD_PART_CORNER_x for rounded corner backgrounds
This matches the behavior of the surrounding borders and will usually
cause resizing instead of triggering the button itself. This effect
is only really visible when using a border width settings of > 1.
Johan Malm [Tue, 7 Jun 2022 21:28:25 +0000 (22:28 +0100)]
view: if view->fullscreen on destroy, re-enable top-layer
The layer-shell top-layer is disabled when running an application in
fullscreen mode, so if this is the case on view_destroy() we have to
re-enabled the top-layer again.
Johan Malm [Sat, 4 Jun 2022 12:20:40 +0000 (13:20 +0100)]
xwayland-unmanaged: prepare for handling more events
Sway handles some xwayland events that labwc still does not. This commit
just starts to rig up some handlers for these with log messages if they
are caught.
- set_geometry: try to handle, but cannot find an application that uses
it, so is untested.
- request_activate - just log caught event
- override_redirect - just log caught event
Consolatis [Fri, 3 Jun 2022 20:40:26 +0000 (22:40 +0200)]
src/config/keybind.c: fix keybind insertion order
This restores the intended behavior of keybinds set by `<default />`
to be overwritten by manually configured keybinds which come later in
the config.
In `src/keyboard.c`, `handle_keybinding()` is going backwards through
the list of keybindings and breaks after the first match.
`wl_list_insert(&list_node, item)` will insert the new item *after* the
list_node so if its called multiple times with the same list_node as
fist argument the result will be a reversed list. Using `list_node.prev`
instead will result in a non-reversed list.
Consolatis [Thu, 2 Jun 2022 09:44:35 +0000 (11:44 +0200)]
IRC notifications: disable push notifications
They were also called for the 'master' and 'v0.5' branches of forks and are
not that helpful anyway because they just post the compare link and not the
title of the commits.
Additionally, they were also called whenever a PR was merged which already
has its own notification including a link to the PR.
Johan Malm [Tue, 17 May 2022 17:10:29 +0000 (18:10 +0100)]
xwayland: call foreign-toplevel-destroy on unmap
Some xwayland clients leave unmapped child views around, typically when a
dialog window is closed. Although handle_destroy() is not called for
these, we have to call foreign-toplevel-destroy to avoid panels and the
like incorrecly showing them.
Johan Malm [Tue, 24 May 2022 16:49:21 +0000 (17:49 +0100)]
cursor: offset xdg invisible border when dragging outside view
Note: view->padding was deleted in commit b279550 as the wlroots
scene-graph xdg-surface commit handler offsets the CSD invisible border.
If view->padding still existed, we could have used that, but considering
that this is probably the only place where this offset will now be
needed (because we're generating surface local coordinates), it's simpler
to just do it locally.
Consolatis [Tue, 24 May 2022 11:02:51 +0000 (13:02 +0200)]
src/cursor.c: Fix branch condition for out-of-view selecting/dragging
Instead of using the stored view for comparison use the actual surface.
Before this patch, there were situations where the branch intended for
out-of-window text selection / scrollbar dragging was used even though
the cursor never left the surface.