summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2016-10-06 16:49:39 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2016-10-13 08:53:59 +0200
commit9e2b1ad39e86b2352116f49214cf195cb3e0e970 (patch)
tree0029b5fd9a5be6a716f2226c86f2c3a54a45540d
parentb65fbbf7390caacd0351e5f29570d487d4e95a10 (diff)
downloadgtk+-9e2b1ad39e86b2352116f49214cf195cb3e0e970.tar.gz
gdkwindow: configure native windows in move_native_children()
ClutterEmbed on Wayland uses a subsurface and relocates it on configure events, but when placed within a scrolled window, no configure event is emitted and the ClutterEmbed subsurface remains static. Emit a configure event for native windows in GdkWindow's internal move_native_children() so that custom widgets relying on configure events such as ClutterEmbed can relocate their stuff. Similarly, when switching to/from normal/maximized/fullscreen states which change the shadows' size and possibly shows/hides a header bar, we need to emit a configure event even if the abs_x/abs_y haven't changed to make sure the subsurface is size appropriately. https://bugzilla.gnome.org/show_bug.cgi?id=771320 https://bugzilla.gnome.org/show_bug.cgi?id=767713
-rw-r--r--gdk/gdkwindow.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 514732d818..bc156dd3d7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5972,6 +5972,24 @@ gdk_window_move_resize_toplevel (GdkWindow *window,
_gdk_synthesize_crossing_events_for_geometry_change (window);
}
+static void
+configure_native_child (GdkWindow *window)
+{
+ GdkDisplay *display;
+ GdkEvent *event;
+
+ event = gdk_event_new (GDK_CONFIGURE);
+
+ event->configure.window = g_object_ref (window);
+ event->configure.send_event = FALSE;
+ event->configure.x = window->x;
+ event->configure.y = window->y;
+ event->configure.width = window->width;
+ event->configure.height = window->height;
+
+ gdk_event_put (event);
+ gdk_event_free (event);
+}
static void
move_native_children (GdkWindow *private)
@@ -5992,7 +6010,10 @@ move_native_children (GdkWindow *private)
child->width, child->height);
}
else
- move_native_children (child);
+ {
+ configure_native_child (child);
+ move_native_children (child);
+ }
}
}
@@ -6080,8 +6101,7 @@ gdk_window_move_resize_internal (GdkWindow *window,
window->x, window->y,
window->width, window->height);
}
- else if (old_abs_x != window->abs_x ||
- old_abs_y != window->abs_y)
+ else
move_native_children (window);
if (expose)