- 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.
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.
Move SSD related map() work into the !view->been_mapped branch,
similar to src/xdg.c.
Without this patch following series of events restores the initial
state of the SSD when activating the view:
- spawn xcalc
- observe it shows the SSD
- toggleDecorations to hide the SSD (via keybinding or window menu)
- minimize xcalc (via some panel or A-Space)
- activate xcalc (via some panel or A-Tab)
- observe the SSD is back visible
This is needed to allow X11 applications to create surfaces as
non-override_redirect and then change them to override_redirect later
Without this gitk-menus and rofi are treated as xwayland-views with
associated server-side-decoration and forced positioning.
Consolidates all of the view destruction code for xwl + xdg into one function.
Fixes several notable bugs along the way:
- Fixes a crash when alt tabbing when a selected view gets destroyed.
- Fixes the OSD not updating to reflect a view has been destroyed.
Commit 08c537e ("xwayland: Honor size increments from
WM_SIZE_HINTS") adjusted only the window width/height according
to the size hints. If resizing from the top or left edge of the
window, we also need to adjust the window position to keep the
bottom or right edge from jumping around.
Support identification of wlr_scene_node role to enable simplification
of codebase including the avoidance of iterating over lists of
layer-surface, menuitems, and so on.
Use node-descriptors for xdg toplevels and popups
Prevents a single action like ToggleDecorations + ToggleMaximize to
position the view somewhere with negative coordinates when unmaximizing.
It may still position the view on negative coordinates but later commit
events will fix the position. This issue only exists on xwayland because
there are no configure serials which we could use to ignore all
repositioning until we are at the latest desired state.
e.g., open an editor from a terminal, minimize it, then hit ^C in the terminal
simply don't unmap xdg or xwayland views if they are not currently marked as mapped
When a window title changed dynamically (for example when running
"cd" within an xfce4-terminal), the titlebar did not immediately
update to show the new title. (The titlebar would update as soon
as the mouse cursor moved.)
...and replace with a local MAX macro, because:
- They contain a ({}) construct which is a GNU extension and that's
against Drew's coding style
- min() is not used anyway
- MAX() clashes with cairo's macro, so best to not add this in labwc.h