mirror of
https://github.com/labwc/labwc.git
synced 2026-02-16 22:05:27 -05:00
view: use midpoint of actual geometry to pick output after layout change
This ensures that maximized/fullscreen/tiled views are restored to the correct output after it is disconnected and reconnected, including: - initially maximized/fullscreen xdg-shell views (which have invalid natural geometry until after being un-maximized/un-fullscreened) - views which were maximized/tiled via snap-to-edge on a different output than the natural/floating geometry
This commit is contained in:
parent
227fe601ad
commit
87fee21c04
2 changed files with 25 additions and 13 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <wayland-util.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include "common/box.h"
|
||||
#include "common/edge.h"
|
||||
#include "config.h"
|
||||
#include "config/types.h"
|
||||
|
|
@ -219,6 +220,14 @@ struct view {
|
|||
* layout change. False if it was due to user-initiated action.
|
||||
*/
|
||||
bool adjusted_for_layout_change;
|
||||
/*
|
||||
* Midpoint of the view's actual geometry prior to adjusting
|
||||
* for a layout change. For floating views, this will match the
|
||||
* natural_geometry, but for maximized/tiled/fullscreen views it
|
||||
* could be on a different output, in which case it is needed to
|
||||
* restore those views to the correct output.
|
||||
*/
|
||||
struct point saved_midpoint;
|
||||
|
||||
/* used by xdg-shell views */
|
||||
uint32_t pending_configure_serial;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue