mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Make gdk_windowing_window_destroy a GdkWindowImpl method
This commit is contained in:
parent
36ce54878b
commit
0ba99e6e7b
@ -360,23 +360,6 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
|
||||
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
|
||||
|
||||
|
||||
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
||||
*
|
||||
* 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.)
|
||||
*/
|
||||
void _gdk_windowing_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy);
|
||||
|
||||
/* Called when gdk_window_destroy() is called on a foreign window
|
||||
* or an ancestor of the foreign window. It should generally reparent
|
||||
* the window out of it's current heirarchy, hide it, and then
|
||||
@ -546,8 +529,6 @@ void _gdk_offscreen_window_new (GdkWindow *window,
|
||||
GdkVisual *visual,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask);
|
||||
void _gdk_offscreen_window_destroy (GdkWindow *window,
|
||||
gboolean recursing);
|
||||
|
||||
|
||||
/************************************
|
||||
|
@ -103,9 +103,10 @@ gdk_offscreen_window_init (GdkOffscreenWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_offscreen_window_destroy (GdkWindow *window,
|
||||
gboolean recursing)
|
||||
static void
|
||||
gdk_offscreen_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
{
|
||||
GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
|
||||
GdkOffscreenWindow *offscreen;
|
||||
@ -1184,6 +1185,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
|
||||
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
|
||||
iface->queue_translation = gdk_offscreen_window_queue_translation;
|
||||
iface->get_origin = gdk_offscreen_window_get_origin;
|
||||
iface->destroy = gdk_offscreen_window_destroy;
|
||||
}
|
||||
|
||||
#define __GDK_OFFSCREEN_WINDOW_C__
|
||||
|
@ -1261,10 +1261,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
|
||||
|
||||
if (gdk_window_has_impl (private))
|
||||
{
|
||||
if (gdk_window_is_offscreen (private))
|
||||
_gdk_offscreen_window_destroy (window, recursing);
|
||||
else
|
||||
_gdk_windowing_window_destroy (window, recursing, foreign_destroy);
|
||||
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->destroy (window, recursing, foreign_destroy);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -112,7 +112,23 @@ struct _GdkWindowImplIface
|
||||
GdkRegion *area,
|
||||
gint dx,
|
||||
gint dy);
|
||||
|
||||
|
||||
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
||||
*
|
||||
* 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.)
|
||||
*/
|
||||
void (* destroy) (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy);
|
||||
};
|
||||
|
||||
/* Interface Functions */
|
||||
|
@ -1001,10 +1001,10 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display,
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_windowing_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
static void
|
||||
_gdk_x11_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
{
|
||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
||||
GdkToplevelX11 *toplevel;
|
||||
@ -5926,6 +5926,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
|
||||
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
|
||||
iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
|
||||
iface->queue_translation = _gdk_x11_window_queue_translation;
|
||||
iface->destroy = _gdk_x11_window_destroy;
|
||||
}
|
||||
|
||||
#define __GDK_WINDOW_X11_C__
|
||||
|
Loading…
Reference in New Issue
Block a user