mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
The top_left_edge_boundary_check() function in xwayland.c ensures that views trying to position themselves at 0,0 don't end up with a titlebar offscreen. However, it doesn't take into account the usable area and thus these views can still end up overlapping a top panel. Also, there is no good reason for top_left_edge_boundary_check() to be xwayland-specific. This logic should really be part of view_adjust_for_layout_change(). To fix all this, add a new view_adjust_floating_geometry() function, which replaces the existing similar (and duplicated) logic in view_apply_natural_geometry() and view_adjust_for_layout_change(). view_adjust_for_layout_change() is already being called from xwayland's set_initial_position(), so top_left_edge_boundary_check() is now redundant and can just be deleted. Lightly tested with waybar and feh --geometry 640x480+0+0. The feh window is now correctly positioned below waybar, even if started before waybar (in that case, the feh window is moved when waybar starts). |
||
|---|---|---|
| .. | ||
| button | ||
| common | ||
| config | ||
| input | ||
| menu | ||
| action.h | ||
| buffer.h | ||
| debug.h | ||
| decorations.h | ||
| dnd.h | ||
| idle.h | ||
| labwc.h | ||
| layers.h | ||
| meson.build | ||
| node.h | ||
| regions.h | ||
| resistance.h | ||
| resize_indicator.h | ||
| session-lock.h | ||
| snap.h | ||
| ssd-internal.h | ||
| ssd.h | ||
| theme.h | ||
| view-impl-common.h | ||
| view.h | ||
| window-rules.h | ||
| workspaces.h | ||
| xwayland.h | ||