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().
This defaults to 1024, which is tiny, but is a requirement
for processes using the deprecated `select` function.
We must reset this back whenever we fork to start a new process,
as this is inherited, and breaks applications using `select` otherwise.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
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.
Without this fix we will never react to output configuration changes
via wlr-randr and friends.
If output_config_apply() commits the new config, handle_output_layout_change()
is called but doesn't do anything because the config is still pending.
This patch moves the code into its own function do_output_layout_change()
which additionally gets called after all output configs are committed.
The original handler is turned into a wrapper around do_output_layout_change().
Reported-by @heroin-moose
Set node position in the configure/set_geometry handlers when moving a
window in response to a client request.
Steps to reproduce weird positioning fixed by this patch:
1. Start leafpad
2. Open Help->About
3. Move the dialog
4. Close the dialog
5. Open it again
6. Drag it and observe a jump in position
There is also an xwayland PyQt5 script in PR #428 which demonstrates
jumpy position.
- 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.
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.
Fixes#420.
To update the wlroots subproject use
meson subprojects update wlroots
Chases wlroots 91943a68a6976ef7c4cc70afc07954a00fae678b
wlr_input_device: remove anon union field
Fixes#415
Add theme options:
- menu.separator.width
- menu.separator.padding.width
- menu.separator.padding.height
- menu.separator.color
Support separator lines defined by <separator />
Note that separator labels (with text) defined by <separator label="" />
are not supported.
Actions GoToDesktop and SendToDesktop now support the new direction
called "last" that corresponds to the last used workspace (see Openbox
help[1] for reference).
[1]: http://openbox.org/wiki/Help:Actions#GoToDesktop
...to compile cleanly with musl on Void Linux and avoid:
```
[9/58] Compiling C object labwc.p/src_action.c.o
../src/action.c: In function 'actions_run':
../src/action.c:204:4: warning: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
204 | kill(getpid(), SIGHUP);
| ^~~~
[58/58] Linking target labwc
```
Reported-by: @M4lin
Apps such as Gamescope eventually want to offer a DRM lease option to use planes and handle all of getting to the screen themselves.
This implements logic to allow leasing of desktop displays