All backends updated.
* foreign windows in our hierarchy.
*/
if (window->parent)
- _gdk_windowing_window_destroy_foreign (window);
+ {
+ impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
+
+ if (gdk_window_has_impl (window))
+ impl_class->destroy_foreign (window);
+ }
/* Also for historical reasons, we remove any filters
* on a foreign window when it or a parent is destroyed;
*
* window: The window being destroyed
* recursing: If TRUE, then this is being called because a parent
- * was destroyed. This generally means that the call to the windowing system
- * to destroy the window can be omitted, since it will be destroyed as a result
- * of the parent being destroyed. Unless @foreign_destroy
- *
- * foreign_destroy: If TRUE, the window or a parent was destroyed by some external
- * agency. The window has already been destroyed and no windowing
- * system calls should be made. (This may never happen for some
- * windowing systems.)
+ * was destroyed. This generally means that the call to the windowing
+ * system to destroy the window can be omitted, since it will be
+ * destroyed as a result of the parent being destroyed.
+ * Unless @foreign_destroy
+ * foreign_destroy: If TRUE, the window or a parent was destroyed by some
+ * external agency. The window has already been destroyed and no
+ * windowing system calls should be made. (This may never happen
+ * for some windowing systems.)
*/
void (* destroy) (GdkWindow *window,
gboolean recursing,
gboolean foreign_destroy);
+ void (*destroy_foreign) (GdkWindow *window);
+
cairo_surface_t * (* resize_cairo_surface) (GdkWindow *window,
cairo_surface_t *surface,
gint width,
}
static void
-_gdk_quartz_window_destroy (GdkWindow *window,
- gboolean recursing,
- gboolean foreign_destroy)
+gdk_quartz_window_destroy (GdkWindow *window,
+ gboolean recursing,
+ gboolean foreign_destroy)
{
GdkWindowImplQuartz *impl;
GdkWindow *parent;
return NULL;
}
-void
-_gdk_windowing_window_destroy_foreign (GdkWindow *window)
+static void
+gdk_quartz_window_destroy_foreign (GdkWindow *window)
{
/* Foreign windows aren't supported in OSX. */
}
impl_class->set_static_gravities = gdk_window_quartz_set_static_gravities;
impl_class->queue_antiexpose = _gdk_quartz_window_queue_antiexpose;
impl_class->translate = _gdk_quartz_window_translate;
- impl_class->destroy = _gdk_quartz_window_destroy;
+ impl_class->destroy = gdk_quartz_window_destroy;
+ impl_class->destroy_foreign = gdk_quartz_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_quartz_resize_cairo_surface;
impl_class->get_shape = gdk_quartz_window_get_shape;
impl_class->get_input_shape = gdk_quartz_window_get_input_shape;
return window;
}
-void
-_gdk_win32_window_destroy (GdkWindow *window,
- gboolean recursing,
- gboolean foreign_destroy)
+static void
+gdk_win32_window_destroy (GdkWindow *window,
+ gboolean recursing,
+ gboolean foreign_destroy)
{
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindowImplWin32 *window_impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
g_return_if_fail (GDK_IS_WINDOW (window));
- GDK_NOTE (MISC, g_print ("_gdk_win32_window_destroy: %p\n",
+ GDK_NOTE (MISC, g_print ("gdk_win32_window_destroy: %p\n",
GDK_WINDOW_HWND (window)));
/* Remove ourself from the modal stack */
return NULL;
}
-void
-_gdk_windowing_window_destroy_foreign (GdkWindow *window)
+static void
+gdk_win32_window_destroy_foreign (GdkWindow *window)
{
/* It's somebody else's window, but in our hierarchy, so reparent it
* to the desktop, and then try to destroy it.
iface->set_static_gravities = gdk_win32_window_set_static_gravities;
iface->queue_antiexpose = _gdk_win32_window_queue_antiexpose;
iface->translate = _gdk_win32_window_translate;
- iface->destroy = _gdk_win32_window_destroy;
+ iface->destroy = gdk_win32_window_destroy;
+ iface->destroy_foreign = gdk_win32_window_destroy_foreign;
iface->resize_cairo_surface = gdk_win32_window_resize_cairo_surface;
iface->get_shape = gdk_win32_window_get_shape;
iface->get_input_shape = gdk_win32_window_get_input_shape;
}
static void
-_gdk_x11_window_destroy (GdkWindow *window,
- gboolean recursing,
- gboolean foreign_destroy)
+gdk_x11_window_destroy (GdkWindow *window,
+ gboolean recursing,
+ gboolean foreign_destroy)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
GdkToplevelX11 *toplevel;
return surface;
}
-void
-_gdk_windowing_window_destroy_foreign (GdkWindow *window)
+static void
+gdk_x11_window_destroy_foreign (GdkWindow *window)
{
/* It's somebody else's window, but in our hierarchy,
* so reparent it to the root window, and then send
impl_class->set_static_gravities = gdk_window_x11_set_static_gravities;
impl_class->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
impl_class->translate = _gdk_x11_window_translate;
- impl_class->destroy = _gdk_x11_window_destroy;
+ impl_class->destroy = gdk_x11_window_destroy;
+ impl_class->destroy_foreign = gdk_x11_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_x11_resize_cairo_surface;
impl_class->get_shape = gdk_x11_window_get_shape;
impl_class->get_input_shape = gdk_x11_window_get_input_shape;