summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2018-03-20 16:25:50 +0100
committerAlexander Larsson <alexl@redhat.com>2018-03-20 16:25:50 +0100
commit4ac450b324bcae047d3fa53986133e18da0ec1bf (patch)
tree8d738d02d54fedaa325dece85fbe2ffcfcf6fb64 /gdk
parent19ca2789c090f74f7785245be0121dcbae7b33fe (diff)
downloadgtk+-4ac450b324bcae047d3fa53986133e18da0ec1bf.tar.gz
Convert all references to GdkEvent->surface
Diffstat (limited to 'gdk')
-rw-r--r--gdk/broadway/gdkeventsource.c20
-rw-r--r--gdk/quartz/GdkQuartzNSWindow.c2
-rw-r--r--gdk/quartz/gdkevents-quartz.c16
-rw-r--r--gdk/win32/gdkdevicemanager-win32.c4
-rw-r--r--gdk/win32/gdkdnd-win32.c4
-rw-r--r--gdk/win32/gdkevents-win32.c18
6 files changed, 32 insertions, 32 deletions
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c
index 00c40b7aac..4f2e67da98 100644
--- a/gdk/broadway/gdkeventsource.c
+++ b/gdk/broadway/gdkeventsource.c
@@ -117,7 +117,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (GDK_ENTER_NOTIFY);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->crossing.time = message->base.time;
event->crossing.x = message->pointer.win_x;
event->crossing.y = message->pointer.win_y;
@@ -137,7 +137,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (GDK_LEAVE_NOTIFY);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->crossing.time = message->base.time;
event->crossing.x = message->pointer.win_x;
event->crossing.y = message->pointer.win_y;
@@ -160,7 +160,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (GDK_MOTION_NOTIFY);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->motion.time = message->base.time;
event->motion.x = message->pointer.win_x;
event->motion.y = message->pointer.win_y;
@@ -184,7 +184,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (message->base.type == 'b' ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->button.time = message->base.time;
event->button.x = message->pointer.win_x;
event->button.y = message->pointer.win_y;
@@ -204,7 +204,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (GDK_SCROLL);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->scroll.time = message->base.time;
event->scroll.x = message->pointer.win_x;
event->scroll.y = message->pointer.win_y;
@@ -243,7 +243,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
event = gdk_event_new (event_type);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->touch.sequence = GUINT_TO_POINTER(message->touch.sequence_id);
event->touch.emulating_pointer = message->touch.is_emulated;
event->touch.time = message->base.time;
@@ -279,7 +279,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (message->base.type == 'k' ? GDK_KEY_PRESS : GDK_KEY_RELEASE);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->key.time = message->base.time;
event->key.keyval = message->key.key;
event->key.state = message->key.state;
@@ -306,7 +306,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
window->y = message->configure_notify.y;
event = gdk_event_new (GDK_CONFIGURE);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->configure.x = message->configure_notify.x;
event->configure.y = message->configure_notify.y;
event->configure.width = message->configure_notify.width;
@@ -340,7 +340,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (GDK_FOCUS_CHANGE);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->focus_change.in = FALSE;
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
node = _gdk_event_queue_append (display, event);
@@ -350,7 +350,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (window)
{
event = gdk_event_new (GDK_FOCUS_CHANGE);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->focus_change.in = TRUE;
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
node = _gdk_event_queue_append (display, event);
diff --git a/gdk/quartz/GdkQuartzNSWindow.c b/gdk/quartz/GdkQuartzNSWindow.c
index 1a567cf8ad..f5359d8318 100644
--- a/gdk/quartz/GdkQuartzNSWindow.c
+++ b/gdk/quartz/GdkQuartzNSWindow.c
@@ -39,7 +39,7 @@
event = gdk_event_new (GDK_DELETE);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
event->any.send_event = FALSE;
_gdk_event_queue_append (gdk_display_get_default (), event);
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index e84104512f..b1109b0bc3 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -146,8 +146,8 @@ _gdk_quartz_events_break_all_grabs (guint32 time)
static void
fixup_event (GdkEvent *event)
{
- if (event->any.window)
- g_object_ref (event->any.window);
+ if (event->any.surface)
+ g_object_ref (event->any.surface);
if (((event->any.type == GDK_ENTER_NOTIFY) ||
(event->any.type == GDK_LEAVE_NOTIFY)) &&
(event->crossing.child_window != NULL))
@@ -515,7 +515,7 @@ generate_motion_event (GdkSurface *window)
GdkQuartzDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_MOTION_NOTIFY);
- event->any.window = NULL;
+ event->any.surface = NULL;
event->any.send_event = TRUE;
screen_point = [NSEvent mouseLocation];
@@ -598,7 +598,7 @@ _gdk_quartz_events_send_map_event (GdkSurface *window)
GdkEvent event;
event.any.type = GDK_MAP;
- event.any.window = window;
+ event.any.surface = window;
gdk_event_put (&event);
}
@@ -1680,8 +1680,8 @@ gdk_event_translate (GdkEvent *event,
done:
if (return_val)
{
- if (event->any.window)
- g_object_ref (event->any.window);
+ if (event->any.surface)
+ g_object_ref (event->any.surface);
if (((event->any.type == GDK_ENTER_NOTIFY) ||
(event->any.type == GDK_LEAVE_NOTIFY)) &&
(event->crossing.child_window != NULL))
@@ -1690,7 +1690,7 @@ gdk_event_translate (GdkEvent *event,
else
{
/* Mark this event as having no resources to be freed */
- event->any.window = NULL;
+ event->any.surface = NULL;
event->any.type = GDK_NOTHING;
}
@@ -1710,7 +1710,7 @@ _gdk_quartz_display_queue_events (GdkDisplay *display)
event = gdk_event_new (GDK_NOTHING);
- event->any.window = NULL;
+ event->any.surface = NULL;
event->any.send_event = FALSE;
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index eb58d57ee8..52b3059252 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -898,7 +898,7 @@ gdk_input_other_event (GdkDisplay *display,
*/
static guint button_map[8] = {0, 1, 4, 5, 2, 3, 6, 7};
- if (event->any.window != wintab_window)
+ if (event->any.surface != wintab_window)
{
g_warning ("gdk_input_other_event: not wintab_window?");
return FALSE;
@@ -1084,7 +1084,7 @@ gdk_input_other_event (GdkDisplay *display,
GDK_SURFACE_HWND (window), x, y));
}
- event->any.window = window;
+ event->any.surface = window;
key_state = get_modifier_key_state ();
if (event->any.type == GDK_BUTTON_PRESS ||
event->any.type == GDK_BUTTON_RELEASE)
diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c
index f036817290..e2d48e3ecf 100644
--- a/gdk/win32/gdkdnd-win32.c
+++ b/gdk/win32/gdkdnd-win32.c
@@ -1669,10 +1669,10 @@ gdk_dropfiles_filter (GdkXEvent *xev,
{
GDK_NOTE (DND, g_print ("WM_DROPFILES: %p\n", msg->hwnd));
- context = gdk_drag_context_new (gdk_surface_get_display (event->any.window),
+ context = gdk_drag_context_new (gdk_surface_get_display (event->any.surface),
FALSE,
NULL,
- event->any.window,
+ event->any.surface,
GDK_ACTION_COPY,
NULL,
GDK_DRAG_PROTO_WIN32_DROPFILES);
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 6aa3da3e0e..326d582ff2 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -804,7 +804,7 @@ _gdk_win32_print_event (const GdkEvent *event)
}
g_print (" %p @ %ums ",
- event->any.window ? GDK_SURFACE_HWND (event->any.window) : NULL,
+ event->any.surface ? GDK_SURFACE_HWND (event->any.surface) : NULL,
gdk_event_get_time (event));
switch (event->any.type)
@@ -945,8 +945,8 @@ decode_key_lparam (LPARAM lParam)
static void
fixup_event (GdkEvent *event)
{
- if (event->any.window)
- g_object_ref (event->any.window);
+ if (event->any.surface)
+ g_object_ref (event->any.surface);
if (((event->any.type == GDK_ENTER_NOTIFY) ||
(event->any.type == GDK_LEAVE_NOTIFY)) &&
(event->crossing.child_window != NULL))
@@ -1058,7 +1058,7 @@ apply_event_filters (GdkSurface *window,
GList *tmp_list;
event = gdk_event_new (GDK_NOTHING);
- event->any.window = g_object_ref (window);
+ event->any.surface = g_object_ref (window);
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
display = gdk_display_get_default ();
@@ -3368,7 +3368,7 @@ gdk_event_translate (MSG *msg,
!GDK_SURFACE_DESTROYED (window))
{
event = gdk_event_new (GDK_MAP);
- event->any.window = window;
+ event->any.surface = window;
_gdk_win32_append_event (event);
}
@@ -3432,7 +3432,7 @@ gdk_event_translate (MSG *msg,
{
/* Send UNMAP events */
event = gdk_event_new (GDK_UNMAP);
- event->any.window = window;
+ event->any.surface = window;
_gdk_win32_append_event (event);
/* Make transient parent the forground window when window unmaps */
@@ -3705,7 +3705,7 @@ gdk_event_translate (MSG *msg,
break;
event = gdk_event_new (GDK_DELETE);
- event->any.window = window;
+ event->any.surface = window;
_gdk_win32_append_event (event);
@@ -3740,7 +3740,7 @@ gdk_event_translate (MSG *msg,
break;
event = gdk_event_new (GDK_DESTROY);
- event->any.window = window;
+ event->any.surface = window;
_gdk_win32_append_event (event);
@@ -3935,7 +3935,7 @@ gdk_event_translate (MSG *msg,
wintab:
event = gdk_event_new (GDK_NOTHING);
- event->any.window = window;
+ event->any.surface = window;
g_object_ref (window);
if (gdk_input_other_event (display, event, msg, window))