summaryrefslogtreecommitdiff
path: root/gdk/gdkwindow.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-07 03:15:00 +0100
committerBenjamin Otte <otte@redhat.com>2016-11-07 03:15:00 +0100
commitb04e25f29b73bfa09c305304d39702b1bab675fd (patch)
tree0ddd85e86af249510131f53038df6b7579ac9393 /gdk/gdkwindow.c
parentd2c26c471c574acc9199d8f032ae2a9d0894481b (diff)
downloadgtk+-b04e25f29b73bfa09c305304d39702b1bab675fd.tar.gz
gdk: gdk_window_new() is not called for foreign windows
So we can remove the special cases that were used for them.
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r--gdk/gdkwindow.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index cdd38895ce..d64a85c7c8 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1122,7 +1122,6 @@ gdk_window_new (GdkWindow *parent,
GdkDisplay *display;
gboolean native;
GdkEventMask event_mask;
- GdkWindow *real_parent;
g_return_val_if_fail (attributes != NULL, NULL);
@@ -1146,13 +1145,6 @@ gdk_window_new (GdkWindow *parent,
window = _gdk_display_create_window (display);
- /* Windows with a foreign parent are treated as if they are children
- * of the root window, except for actual creation.
- */
- real_parent = parent;
- if (GDK_WINDOW_TYPE (parent) == GDK_WINDOW_FOREIGN)
- parent = gdk_screen_get_root_window (screen);
-
window->parent = parent;
window->accept_focus = TRUE;
@@ -1233,14 +1225,14 @@ gdk_window_new (GdkWindow *parent,
event_mask = get_native_event_mask (window);
/* Create the impl */
- _gdk_display_create_window_impl (display, window, real_parent, screen, event_mask, attributes);
+ _gdk_display_create_window_impl (display, window, parent, screen, event_mask, attributes);
window->impl_window = window;
parent->impl_window->native_children = g_list_prepend (parent->impl_window->native_children, window);
/* This will put the native window topmost in the native parent, which may
* be wrong wrt other native windows in the non-native hierarchy, so restack */
- if (!_gdk_window_has_impl (real_parent))
+ if (!_gdk_window_has_impl (parent))
sync_native_window_stack_position (window);
}
else