Consolatis [Fri, 12 Aug 2022 12:12:31 +0000 (14:12 +0200)]
src/ssd/ssd_titlebar.c: Completely hide title when running out of space
Before this commit the window title could overflow in certain conditions,
usually when rapidly resizing. This commit fixes it by completely hiding
the corresponding scene node when there is no space available.
This allows xdg-desktop-portal-wlr to work out of the box for screen-recording.
If systemd or dbus is not available the environment update will fail gracefully.
This patch will set XDG_CURRENT_DESKTOP=wlroots but a user may change this by
either having the environment variable set before starting labwc or by having
a different value set in ~/.config/labwc/environment.
John Lindgren [Sat, 23 Jul 2022 15:20:34 +0000 (11:20 -0400)]
xwayland: Process unmanaged client configure requests more quickly
This is a similar fix to 065c37d3f5ee but for unmanaged windows. The issue
could be seen for example when moving the undocked Search Tool window in
Audacious. For unmanaged windows, we don't track any pending move/resizes,
so just process all client configure requests immediately.
For some reason wlroots will reset the seat assigned to xwayland
to NULL whenever Xwayland terminates. This patch restores the seat
whenever Xwayland is ready again.
Fixes #166
Fixes #444
Thanks @droc12345 for figuring out the actual issue.
John Lindgren [Mon, 18 Jul 2022 03:42:04 +0000 (23:42 -0400)]
xwayland: Process move-only client configure requests more quickly
For a move-only client configure request, treat it similarly to
view_move() by updating the scene-graph immediately, rather than waiting
for handle_commit(). Move-and-resize requests are handled the same as
before.
This (mostly?) fixes the glitchiness that was noticeable when dragging
an undecorated XWayland window (e.g. Audacious in Winamp mode).
Also:
- Reduce some code duplication in handle_request_configure() by
simply calling configure(), as suggested by @johanmalm in #428.
- Factor out common logic after a move and/or resize into view_moved().
src/view.c: Prevent crash by killing a moving application
When a view is destroyed labwc calls interactive_end(view) which
may reposition the view which is partly destroyed and doesn't own
any surface anymore. To prevent this scenario from happening don't
call interactive_end() at all and just reset server->grabbed_view
and server->input_mode directly.
Before this patch, the bug could be reproduced by:
- xcalc &
- sleep 5; killall xcalc
- move the xcalc window completely to one of the edges
The change in src/xwayland.c is not required for this bug
to be fixed but may prevent something similar in the future.
Johan Malm [Sun, 10 Jul 2022 15:43:05 +0000 (16:43 +0100)]
README.md: refresh and refactor
- Use &nsbp; in links with spaces
- Change headings from verbs to nouns
- Combine build and install headings
- In 'What is this', use the text on the labwc website
- Remove video links; one wasn't working and the other were very old
- Use more recent screenshot
- Simplify the 'labwc supports the following' bullet points
- Split dependencies into build and run-time
- Remove dependecy version numbers and let meson.build be the source of
truth
- Simplify config file table by taking out middle column
- Split the configuration section into configuration and theming
- s/roadmap/scope
- Change man page links from docs/ to labwc.github.io/
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.