summaryrefslogtreecommitdiff
path: root/src/core/window-private.h
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-09-05 14:30:17 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-09-14 00:41:53 +0300
commitc8235d44a7fba351f3c6075c8e268a01c1255bfb (patch)
treeae868e75429377be61bea81285354a49b1a78e7f /src/core/window-private.h
parentd820fce97a3a34b8c17540b1b51a45ee0e2b9b7f (diff)
downloadmetacity-c8235d44a7fba351f3c6075c8e268a01c1255bfb.tar.gz
core: preserve focus across decoration changes
Changes in window decoration result in the window being reparented in and out its frame. This in turn causes unmap/map events, and FocusOut if the window happened to be focused. In order to preserve the focused window across the decoration change, add a flag so that the focus may be restored on MapNotify. Based on mutter commit: https://gitlab.gnome.org/GNOME/mutter/commit/8dcac664faf03ac2ea382e
Diffstat (limited to 'src/core/window-private.h')
-rw-r--r--src/core/window-private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 7f7eb276..cc99b7a1 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -341,6 +341,9 @@ struct _MetaWindow
/* if TRUE, we are freezing updates during a resize */
guint updates_frozen_for_resize : 1;
+ /* whether focus should be restored on map */
+ guint restore_focus_on_map : 1;
+
/* if non-NULL, the bounds of the window frame */
cairo_region_t *frame_bounds;