mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Add restack_under method to GdkWindomImpl
This commit is contained in:
parent
cce1ff8eb8
commit
377ca19c9f
@ -48,6 +48,8 @@ struct _GdkWindowImplIface
|
||||
void (* withdraw) (GdkWindow *window);
|
||||
void (* raise) (GdkWindow *window);
|
||||
void (* lower) (GdkWindow *window);
|
||||
void (* restack_under) (GdkWindow *window,
|
||||
GList *native_siblings);
|
||||
|
||||
void (* move_resize) (GdkWindow *window,
|
||||
gboolean with_move,
|
||||
|
@ -1633,15 +1633,35 @@ gdk_window_x11_reparent (GdkWindow *window,
|
||||
static void
|
||||
gdk_window_x11_raise (GdkWindow *window)
|
||||
{
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
XRaiseWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
|
||||
XRaiseWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_x11_restack_under (GdkWindow *window,
|
||||
GList *native_siblings /* in requested order, first is bottom-most */)
|
||||
{
|
||||
Window *windows;
|
||||
int n_windows, i;
|
||||
GList *l;
|
||||
|
||||
n_windows = g_list_length (native_siblings) + 1;
|
||||
windows = g_new (Window, n_windows);
|
||||
|
||||
windows[0] = GDK_WINDOW_XID (window);
|
||||
/* Reverse order, as input order is bottom-most first */
|
||||
i = n_windows - 1;
|
||||
for (l = native_siblings; l != NULL; l = l->next)
|
||||
windows[i--] = GDK_WINDOW_XID (l->data);
|
||||
|
||||
XRestackWindows (GDK_WINDOW_XDISPLAY (window), windows, n_windows);
|
||||
|
||||
g_free (windows);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_x11_lower (GdkWindow *window)
|
||||
{
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
XLowerWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
|
||||
XLowerWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5460,6 +5480,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
|
||||
iface->get_events = gdk_window_x11_get_events;
|
||||
iface->raise = gdk_window_x11_raise;
|
||||
iface->lower = gdk_window_x11_lower;
|
||||
iface->restack_under = gdk_window_x11_restack_under;
|
||||
iface->move_resize = gdk_window_x11_move_resize;
|
||||
iface->set_background = gdk_window_x11_set_background;
|
||||
iface->set_back_pixmap = gdk_window_x11_set_back_pixmap;
|
||||
|
Loading…
Reference in New Issue
Block a user