forked from AuroraMiddleware/gtk
x11: Stop using child surface api
We no longer have child surfaces. Drop code that only makes sense in that case.
This commit is contained in:
parent
c3c33ac168
commit
68e5456db9
@ -1183,7 +1183,7 @@ set_user_time (GdkEvent *event)
|
||||
GdkSurface *surface;
|
||||
guint32 time;
|
||||
|
||||
surface = gdk_surface_get_toplevel (event->any.surface);
|
||||
surface = event->any.surface;
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
time = gdk_event_get_time (event);
|
||||
@ -1249,24 +1249,6 @@ translate_axes (GdkDevice *device,
|
||||
return axes;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_parent_of (GdkSurface *parent,
|
||||
GdkSurface *child)
|
||||
{
|
||||
GdkSurface *w;
|
||||
|
||||
w = child;
|
||||
while (w != NULL)
|
||||
{
|
||||
if (w == parent)
|
||||
return TRUE;
|
||||
|
||||
w = gdk_surface_get_parent (w);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
get_event_surface (GdkEventTranslator *translator,
|
||||
XIEvent *ev,
|
||||
@ -1308,9 +1290,7 @@ get_event_surface (GdkEventTranslator *translator,
|
||||
serial = _gdk_display_get_next_serial (display);
|
||||
info = _gdk_display_has_device_grab (display, device, serial);
|
||||
|
||||
if (info &&
|
||||
(!is_parent_of (info->surface, surface) ||
|
||||
!info->owner_events))
|
||||
if (info && !info->owner_events)
|
||||
{
|
||||
/* Report key event against grab surface */
|
||||
surface = info->surface;
|
||||
|
@ -227,7 +227,7 @@ set_sync_counter(Display *display,
|
||||
void
|
||||
gdk_x11_surface_pre_damage (GdkSurface *surface)
|
||||
{
|
||||
GdkSurface *toplevel_surface = gdk_surface_get_toplevel (surface);
|
||||
GdkSurface *toplevel_surface = surface;
|
||||
GdkSurfaceImplX11 *impl;
|
||||
|
||||
if (!toplevel_surface || !SURFACE_IS_TOPLEVEL (toplevel_surface))
|
||||
|
@ -62,8 +62,7 @@ _gdk_x11_display_add_window (GdkDisplay *display,
|
||||
|
||||
g_hash_table_insert (display_x11->xid_ht, xid, data);
|
||||
|
||||
if (gdk_surface_get_parent (GDK_SURFACE (data)) == NULL)
|
||||
display_x11->toplevels = g_list_prepend (display_x11->toplevels, data);
|
||||
display_x11->toplevels = g_list_prepend (display_x11->toplevels, data);
|
||||
}
|
||||
|
||||
void
|
||||
@ -81,7 +80,7 @@ _gdk_x11_display_remove_window (GdkDisplay *display,
|
||||
return;
|
||||
|
||||
surface = g_hash_table_lookup (display_x11->xid_ht, &xid);
|
||||
if (surface && gdk_surface_get_parent (surface) == NULL)
|
||||
if (surface)
|
||||
display_x11->toplevels = g_list_remove (display_x11->toplevels, surface);
|
||||
|
||||
g_hash_table_remove (display_x11->xid_ht, &xid);
|
||||
|
Loading…
Reference in New Issue
Block a user