summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkeventsource.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2018-03-20 15:14:10 +0100
committerAlexander Larsson <alexl@redhat.com>2018-03-20 15:14:10 +0100
commit3dce0dcca705c4ab6d8c4f5067db93947184b6af (patch)
tree8de99e5b35abc5242accafb84d0526b08c66b9e7 /gdk/x11/gdkeventsource.c
parent9a7e721181ce714ab248429dc1258984b9e10748 (diff)
downloadgtk+-3dce0dcca705c4ab6d8c4f5067db93947184b6af.tar.gz
GdkSurface: Rename lots of stuff from window->surface
Mostly these are internal things, but the major public change is that event.window is now event.surface.
Diffstat (limited to 'gdk/x11/gdkeventsource.c')
-rw-r--r--gdk/x11/gdkeventsource.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 88007c2e89..a4bbea0079 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -56,12 +56,12 @@ static GSourceFuncs event_funcs = {
};
static GdkSurface *
-gdk_event_source_get_filter_window (GdkEventSource *event_source,
- const XEvent *xevent,
- GdkEventTranslator **event_translator)
+gdk_event_source_get_filter_surface (GdkEventSource *event_source,
+ const XEvent *xevent,
+ GdkEventTranslator **event_translator)
{
GList *list = event_source->translators;
- GdkSurface *window;
+ GdkSurface *surface;
*event_translator = NULL;
@@ -70,23 +70,23 @@ gdk_event_source_get_filter_window (GdkEventSource *event_source,
GdkEventTranslator *translator = list->data;
list = list->next;
- window = _gdk_x11_event_translator_get_window (translator,
+ surface = _gdk_x11_event_translator_get_surface (translator,
event_source->display,
xevent);
- if (window)
+ if (surface)
{
*event_translator = translator;
- return window;
+ return surface;
}
}
- window = gdk_x11_surface_lookup_for_display (event_source->display,
+ surface = gdk_x11_surface_lookup_for_display (event_source->display,
xevent->xany.window);
- if (window && !GDK_IS_SURFACE (window))
- window = NULL;
+ if (surface && !GDK_IS_SURFACE (surface))
+ surface = NULL;
- return window;
+ return surface;
}
static void
@@ -96,8 +96,8 @@ handle_focus_change (GdkEventCrossing *event)
GdkX11Screen *x11_screen;
gboolean focus_in, had_focus;
- toplevel = _gdk_x11_surface_get_toplevel (event->any.window);
- x11_screen = GDK_X11_SCREEN (GDK_SURFACE_SCREEN (event->any.window));
+ toplevel = _gdk_x11_surface_get_toplevel (event->any.surface);
+ x11_screen = GDK_X11_SCREEN (GDK_SURFACE_SCREEN (event->any.surface));
focus_in = (event->any.type == GDK_ENTER_NOTIFY);
if (x11_screen->wmspec_check_window)
@@ -119,12 +119,12 @@ handle_focus_change (GdkEventCrossing *event)
GdkEvent *focus_event;
focus_event = gdk_event_new (GDK_FOCUS_CHANGE);
- focus_event->any.window = g_object_ref (event->any.window);
+ focus_event->any.surface = g_object_ref (event->any.surface);
focus_event->any.send_event = FALSE;
focus_event->focus_change.in = focus_in;
gdk_event_set_device (focus_event, gdk_event_get_device ((GdkEvent *) event));
- gdk_display_put_event (gdk_surface_get_display (event->any.window), focus_event);
+ gdk_display_put_event (gdk_surface_get_display (event->any.surface), focus_event);
g_object_unref (focus_event);
}
}
@@ -142,7 +142,7 @@ create_synth_crossing_event (GdkEventType evtype,
event = gdk_event_new (evtype);
event->any.send_event = TRUE;
- event->any.window = g_object_ref (real_event->any.window);
+ event->any.surface = g_object_ref (real_event->any.surface);
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.mode = mode;
event->crossing.time = gdk_event_get_time (real_event);
@@ -232,7 +232,7 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
GdkFilterReturn result = GDK_FILTER_CONTINUE;
GdkDisplay *display = GDK_DISPLAY (x11_display);
GdkEventTranslator *event_translator;
- GdkSurface *filter_window;
+ GdkSurface *filter_surface;
Display *dpy;
GdkX11Screen *x11_screen;
gpointer cache;
@@ -241,10 +241,10 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
dpy = GDK_DISPLAY_XDISPLAY (display);
- filter_window = gdk_event_source_get_filter_window (event_source, xevent,
+ filter_surface = gdk_event_source_get_filter_surface (event_source, xevent,
&event_translator);
- if (filter_window)
- event->any.window = g_object_ref (filter_window);
+ if (filter_surface)
+ event->any.surface = g_object_ref (filter_surface);
/* apply XSettings filters */
if (xevent->xany.window == XRootWindow (dpy, 0))
@@ -271,9 +271,9 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
if (result == GDK_FILTER_CONTINUE)
result = _gdk_x11_dnd_filter (xevent, event, NULL);
- if (result == GDK_FILTER_CONTINUE && filter_window)
+ if (result == GDK_FILTER_CONTINUE && filter_surface)
{
- gpointer context = g_object_get_data (G_OBJECT (filter_window), "xdnd-source-context");
+ gpointer context = g_object_get_data (G_OBJECT (filter_surface), "xdnd-source-context");
result = xdnd_source_surface_filter (xevent, event, context);
}
@@ -316,7 +316,7 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
if (event &&
(event->any.type == GDK_ENTER_NOTIFY ||
event->any.type == GDK_LEAVE_NOTIFY) &&
- event->any.window != NULL)
+ event->any.surface != NULL)
{
/* Handle focusing (in the case where no window manager is running */
handle_focus_change (&event->crossing);