mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
view: Fix positioning of initially-maximized XWayland views
map() in xwayland.c called ssd_create() but did not call view_apply_maximized_geometry() afterward, resulting in the decorations being displayed off-screen. Rather than calling view_apply_maximized_geometry() in more places, let's reuse the existing call in view_set_decorations(), and extend ssd_update_geometry() to call ssd_create() when needed.
This commit is contained in:
parent
0b6eca097d
commit
2995d0e8e0
3 changed files with 6 additions and 11 deletions
|
|
@ -169,16 +169,18 @@ ssd_create(struct view *view)
|
|||
void
|
||||
ssd_update_geometry(struct view *view)
|
||||
{
|
||||
if (!view->ssd.tree || !view->scene_node) {
|
||||
if (!view->scene_node) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view->ssd.enabled) {
|
||||
if (view->ssd.tree->node.enabled) {
|
||||
if (view->ssd.tree && view->ssd.tree->node.enabled) {
|
||||
wlr_scene_node_set_enabled(&view->ssd.tree->node, false);
|
||||
view->margin = ssd_thickness(view);
|
||||
}
|
||||
return;
|
||||
} else if (!view->ssd.tree) {
|
||||
ssd_create(view);
|
||||
} else if (!view->ssd.tree->node.enabled) {
|
||||
wlr_scene_node_set_enabled(&view->ssd.tree->node, true);
|
||||
view->margin = ssd_thickness(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue