mirror of
https://github.com/labwc/labwc.git
synced 2026-06-14 14:33:17 -04:00
view: save view->last_placement on initial positioning
Fix a regression introduced in3f223fe5where output layout changes may move xdg views outside of the output layout with the error: `view has no last placement info`. This happens also for X11 views if they don't specify its own geometry on map. Recent changes introduced `view->last_placement` which is used to restore view positions after layout changes. This is supposed to be updated when a view is mapped or manually moved by the user. However,3f223fe5replaced `view_place_by_policy()` with `view_compute_position_by_policy()` in the xdg view map handler. Unlike `view_place_by_policy()`, this function does not update `view->last_placement`, leaving it unset at the time of output layout changes. Therefore, this patch adds explicit calls to `view_save_last_placement()` in the map handler to ensure `view->last_placement` is always set for mapped views. Backported from3bb4ccd22dFixes: #3616
This commit is contained in:
parent
1f118c84ed
commit
e563356198
4 changed files with 16 additions and 5 deletions
|
|
@ -128,6 +128,8 @@ do_late_positioning(struct view *view)
|
|||
view->pending.width, view->pending.height,
|
||||
&view->pending.x, &view->pending.y);
|
||||
}
|
||||
|
||||
view_save_last_placement(view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue