mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Add a vfunc to replace _gdk_windowing_window_destroy_foreign
All backends updated.
This commit is contained in:
parent
1e694b4dd8
commit
9a1cc81acb
@ -1934,7 +1934,12 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
|
||||
* 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;
|
||||
|
@ -140,19 +140,21 @@ struct _GdkWindowImplClass
|
||||
*
|
||||
* 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,
|
||||
|
@ -1060,7 +1060,7 @@ _gdk_windowing_window_init (void)
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_quartz_window_destroy (GdkWindow *window,
|
||||
gdk_quartz_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
{
|
||||
@ -1115,8 +1115,8 @@ gdk_window_quartz_resize_cairo_surface (GdkWindow *window,
|
||||
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. */
|
||||
}
|
||||
@ -2959,7 +2959,8 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
|
||||
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;
|
||||
|
@ -685,8 +685,8 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
|
||||
return window;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_win32_window_destroy (GdkWindow *window,
|
||||
static void
|
||||
gdk_win32_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
{
|
||||
@ -696,7 +696,7 @@ _gdk_win32_window_destroy (GdkWindow *window,
|
||||
|
||||
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 */
|
||||
@ -744,8 +744,8 @@ gdk_win32_window_resize_cairo_surface (GdkWindow *window,
|
||||
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.
|
||||
@ -3284,7 +3284,8 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
|
||||
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;
|
||||
|
@ -1001,7 +1001,7 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display,
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_x11_window_destroy (GdkWindow *window,
|
||||
gdk_x11_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
{
|
||||
@ -1040,8 +1040,8 @@ gdk_window_x11_resize_cairo_surface (GdkWindow *window,
|
||||
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
|
||||
@ -4999,7 +4999,8 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user