[gtk] broadway: Fix up window -> surface renames
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] broadway: Fix up window -> surface renames
- Date: Wed, 21 Mar 2018 08:20:20 +0000 (UTC)
commit 3f2894fec10ec313bcb3a40ecef058a10b330706
Author: Alexander Larsson <alexl redhat com>
Date: Wed Mar 21 09:17:50 2018 +0100
broadway: Fix up window -> surface renames
gdk/broadway/gdkbroadwaysurface.h | 2 +-
gdk/broadway/gdkdevice-broadway.c | 192 ++++++------
gdk/broadway/gdkdnd-broadway.c | 38 +--
gdk/broadway/gdkeventsource.c | 80 ++---
gdk/broadway/gdkprivate-broadway.h | 104 ++++---
gdk/broadway/gdksurface-broadway.c | 609 +++++++++++++++++++------------------
gdk/broadway/gdksurface-broadway.h | 2 +-
7 files changed, 513 insertions(+), 514 deletions(-)
---
diff --git a/gdk/broadway/gdkbroadwaysurface.h b/gdk/broadway/gdkbroadwaysurface.h
index 12ce448c51..f9e137b181 100644
--- a/gdk/broadway/gdkbroadwaysurface.h
+++ b/gdk/broadway/gdkbroadwaysurface.h
@@ -47,7 +47,7 @@ GDK_AVAILABLE_IN_ALL
GType gdk_broadway_surface_get_type (void);
GDK_AVAILABLE_IN_ALL
-guint32 gdk_broadway_get_last_seen_time (GdkSurface *window);
+guint32 gdk_broadway_get_last_seen_time (GdkSurface *surface);
G_END_DECLS
diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c
index baff0c0360..fa2543984e 100644
--- a/gdk/broadway/gdkdevice-broadway.c
+++ b/gdk/broadway/gdkdevice-broadway.c
@@ -24,46 +24,46 @@
#include "gdkprivate-broadway.h"
static gboolean gdk_broadway_device_get_history (GdkDevice *device,
- GdkSurface *window,
- guint32 start,
- guint32 stop,
- GdkTimeCoord ***events,
- gint *n_events);
+ GdkSurface *surface,
+ guint32 start,
+ guint32 stop,
+ GdkTimeCoord ***events,
+ gint *n_events);
static void gdk_broadway_device_get_state (GdkDevice *device,
- GdkSurface *window,
- gdouble *axes,
- GdkModifierType *mask);
+ GdkSurface *surface,
+ gdouble *axes,
+ GdkModifierType *mask);
static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
- GdkSurface *window,
- GdkCursor *cursor);
+ GdkSurface *surface,
+ GdkCursor *cursor);
static void gdk_broadway_device_warp (GdkDevice *device,
- gdouble x,
- gdouble y);
+ gdouble x,
+ gdouble y);
static void gdk_broadway_device_query_state (GdkDevice *device,
- GdkSurface *window,
- GdkSurface **child_window,
+ GdkSurface *surface,
+ GdkSurface **child_surface,
gdouble *root_x,
gdouble *root_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask);
static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
- GdkSurface *window,
- gboolean owner_events,
- GdkEventMask event_mask,
- GdkSurface *confine_to,
- GdkCursor *cursor,
- guint32 time_);
+ GdkSurface *surface,
+ gboolean owner_events,
+ GdkEventMask event_mask,
+ GdkSurface *confine_to,
+ GdkCursor *cursor,
+ guint32 time_);
static void gdk_broadway_device_ungrab (GdkDevice *device,
- guint32 time_);
+ guint32 time_);
static GdkSurface * gdk_broadway_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
- GdkModifierType *mask,
- gboolean get_toplevel);
+ gdouble *win_x,
+ gdouble *win_y,
+ GdkModifierType *mask,
+ gboolean get_toplevel);
static void gdk_broadway_device_select_surface_events (GdkDevice *device,
- GdkSurface *window,
- GdkEventMask event_mask);
+ GdkSurface *surface,
+ GdkEventMask event_mask);
G_DEFINE_TYPE (GdkBroadwayDevice, gdk_broadway_device, GDK_TYPE_DEVICE)
@@ -97,24 +97,24 @@ gdk_broadway_device_init (GdkBroadwayDevice *device_core)
static gboolean
gdk_broadway_device_get_history (GdkDevice *device,
- GdkSurface *window,
- guint32 start,
- guint32 stop,
- GdkTimeCoord ***events,
- gint *n_events)
+ GdkSurface *surface,
+ guint32 start,
+ guint32 stop,
+ GdkTimeCoord ***events,
+ gint *n_events)
{
return FALSE;
}
static void
gdk_broadway_device_get_state (GdkDevice *device,
- GdkSurface *window,
- gdouble *axes,
- GdkModifierType *mask)
+ GdkSurface *surface,
+ gdouble *axes,
+ GdkModifierType *mask)
{
gdouble x, y;
- gdk_surface_get_device_position_double (window, device, &x, &y, mask);
+ gdk_surface_get_device_position_double (surface, device, &x, &y, mask);
if (axes)
{
@@ -125,27 +125,27 @@ gdk_broadway_device_get_state (GdkDevice *device,
static void
gdk_broadway_device_set_surface_cursor (GdkDevice *device,
- GdkSurface *window,
- GdkCursor *cursor)
+ GdkSurface *surface,
+ GdkCursor *cursor)
{
}
static void
gdk_broadway_device_warp (GdkDevice *device,
- gdouble x,
- gdouble y)
+ gdouble x,
+ gdouble y)
{
}
static void
gdk_broadway_device_query_state (GdkDevice *device,
- GdkSurface *window,
- GdkSurface **child_window,
- gdouble *root_x,
- gdouble *root_y,
- gdouble *win_x,
- gdouble *win_y,
- GdkModifierType *mask)
+ GdkSurface *surface,
+ GdkSurface **child_surface,
+ gdouble *root_x,
+ gdouble *root_y,
+ gdouble *win_x,
+ gdouble *win_y,
+ GdkModifierType *mask)
{
GdkDisplay *display;
GdkBroadwayDisplay *broadway_display;
@@ -160,10 +160,10 @@ gdk_broadway_device_query_state (GdkDevice *device,
broadway_display = GDK_BROADWAY_DISPLAY (display);
_gdk_broadway_server_query_mouse (broadway_display->server,
- &mouse_toplevel_id,
- &device_root_x,
- &device_root_y,
- &mask32);
+ &mouse_toplevel_id,
+ &device_root_x,
+ &device_root_y,
+ &mask32);
if (root_x)
*root_x = device_root_x;
@@ -175,25 +175,25 @@ gdk_broadway_device_query_state (GdkDevice *device,
*win_y = device_root_y;
if (mask)
*mask = mask32;
- if (child_window)
+ if (child_surface)
{
GdkSurface *mouse_toplevel;
mouse_toplevel = g_hash_table_lookup (broadway_display->id_ht, GUINT_TO_POINTER (mouse_toplevel_id));
- if (window == NULL)
- *child_window = mouse_toplevel;
+ if (surface == NULL)
+ *child_surface = mouse_toplevel;
else
- *child_window = NULL;
+ *child_surface = NULL;
}
return;
}
void
-_gdk_broadway_surface_grab_check_unmap (GdkSurface *window,
- gulong serial)
+_gdk_broadway_surface_grab_check_unmap (GdkSurface *surface,
+ gulong serial)
{
- GdkDisplay *display = gdk_surface_get_display (window);
+ GdkDisplay *display = gdk_surface_get_display (surface);
GdkSeat *seat;
GList *devices, *d;
@@ -203,18 +203,18 @@ _gdk_broadway_surface_grab_check_unmap (GdkSurface *window,
devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat));
devices = g_list_prepend (devices, gdk_seat_get_pointer (seat));
- /* End all grabs on the newly hidden window */
+ /* End all grabs on the newly hidden surface */
for (d = devices; d; d = d->next)
- _gdk_display_end_device_grab (display, d->data, serial, window, TRUE);
+ _gdk_display_end_device_grab (display, d->data, serial, surface, TRUE);
g_list_free (devices);
}
void
-_gdk_broadway_surface_grab_check_destroy (GdkSurface *window)
+_gdk_broadway_surface_grab_check_destroy (GdkSurface *surface)
{
- GdkDisplay *display = gdk_surface_get_display (window);
+ GdkDisplay *display = gdk_surface_get_display (surface);
GdkSeat *seat;
GdkDeviceGrabInfo *grab;
GList *devices, *d;
@@ -227,14 +227,14 @@ _gdk_broadway_surface_grab_check_destroy (GdkSurface *window)
for (d = devices; d; d = d->next)
{
- /* Make sure there is no lasting grab in this native window */
+ /* Make sure there is no lasting grab in this native surface */
grab = _gdk_display_get_last_device_grab (display, d->data);
- if (grab && grab->native_surface == window)
- {
- grab->serial_end = grab->serial_start;
- grab->implicit_ungrab = TRUE;
- }
+ if (grab && grab->native_surface == surface)
+ {
+ grab->serial_end = grab->serial_start;
+ grab->implicit_ungrab = TRUE;
+ }
}
@@ -244,12 +244,12 @@ _gdk_broadway_surface_grab_check_destroy (GdkSurface *window)
static GdkGrabStatus
gdk_broadway_device_grab (GdkDevice *device,
- GdkSurface *window,
- gboolean owner_events,
- GdkEventMask event_mask,
- GdkSurface *confine_to,
- GdkCursor *cursor,
- guint32 time_)
+ GdkSurface *surface,
+ gboolean owner_events,
+ GdkEventMask event_mask,
+ GdkSurface *confine_to,
+ GdkCursor *cursor,
+ guint32 time_)
{
GdkDisplay *display;
GdkBroadwayDisplay *broadway_display;
@@ -266,10 +266,10 @@ gdk_broadway_device_grab (GdkDevice *device,
{
/* Device is a pointer */
return _gdk_broadway_server_grab_pointer (broadway_display->server,
- GDK_SURFACE_IMPL_BROADWAY (window->impl)->id,
- owner_events,
- event_mask,
- time_);
+ GDK_SURFACE_IMPL_BROADWAY (surface->impl)->id,
+ owner_events,
+ event_mask,
+ time_);
}
}
@@ -280,7 +280,7 @@ gdk_broadway_device_grab (GdkDevice *device,
static void
gdk_broadway_device_ungrab (GdkDevice *device,
- guint32 time_)
+ guint32 time_)
{
GdkDisplay *display;
GdkBroadwayDisplay *broadway_display;
@@ -300,34 +300,34 @@ gdk_broadway_device_ungrab (GdkDevice *device,
serial = _gdk_broadway_server_ungrab_pointer (broadway_display->server, time_);
if (serial != 0)
- {
- grab = _gdk_display_get_last_device_grab (display, device);
- if (grab &&
- (time_ == GDK_CURRENT_TIME ||
- grab->time == GDK_CURRENT_TIME ||
- !TIME_IS_LATER (grab->time, time_)))
- grab->serial_end = serial;
- }
+ {
+ grab = _gdk_display_get_last_device_grab (display, device);
+ if (grab &&
+ (time_ == GDK_CURRENT_TIME ||
+ grab->time == GDK_CURRENT_TIME ||
+ !TIME_IS_LATER (grab->time, time_)))
+ grab->serial_end = serial;
+ }
}
}
static GdkSurface *
gdk_broadway_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
- GdkModifierType *mask,
- gboolean get_toplevel)
+ gdouble *win_x,
+ gdouble *win_y,
+ GdkModifierType *mask,
+ gboolean get_toplevel)
{
- GdkSurface *window;
+ GdkSurface *surface;
- gdk_broadway_device_query_state (device, NULL, &window, NULL, NULL, win_x, win_y, mask);
+ gdk_broadway_device_query_state (device, NULL, &surface, NULL, NULL, win_x, win_y, mask);
- return window;
+ return surface;
}
static void
gdk_broadway_device_select_surface_events (GdkDevice *device,
- GdkSurface *window,
- GdkEventMask event_mask)
+ GdkSurface *surface,
+ GdkEventMask event_mask)
{
}
diff --git a/gdk/broadway/gdkdnd-broadway.c b/gdk/broadway/gdkdnd-broadway.c
index 91023fa8f2..e3836f9d62 100644
--- a/gdk/broadway/gdkdnd-broadway.c
+++ b/gdk/broadway/gdkdnd-broadway.c
@@ -84,36 +84,36 @@ gdk_broadway_drag_context_finalize (GObject *object)
/* Drag Contexts */
GdkDragContext *
-_gdk_broadway_surface_drag_begin (GdkSurface *window,
- GdkDevice *device,
- GdkContentProvider *content,
- GdkDragAction actions,
- gint dx,
- gint dy)
+_gdk_broadway_surface_drag_begin (GdkSurface *surface,
+ GdkDevice *device,
+ GdkContentProvider *content,
+ GdkDragAction actions,
+ gint dx,
+ gint dy)
{
GdkDragContext *new_context;
- g_return_val_if_fail (window != NULL, NULL);
- g_return_val_if_fail (GDK_SURFACE_IS_BROADWAY (window), NULL);
+ g_return_val_if_fail (surface != NULL, NULL);
+ g_return_val_if_fail (GDK_SURFACE_IS_BROADWAY (surface), NULL);
new_context = g_object_new (GDK_TYPE_BROADWAY_DRAG_CONTEXT,
- "display", gdk_surface_get_display (window),
+ "display", gdk_surface_get_display (surface),
"content", content,
- NULL);
+ NULL);
return new_context;
}
static void
gdk_broadway_drag_context_drag_drop (GdkDragContext *context,
- guint32 time)
+ guint32 time)
{
g_return_if_fail (context != NULL);
}
static void
gdk_broadway_drag_context_drag_abort (GdkDragContext *context,
- guint32 time)
+ guint32 time)
{
g_return_if_fail (context != NULL);
}
@@ -122,30 +122,30 @@ gdk_broadway_drag_context_drag_abort (GdkDragContext *context,
static void
gdk_broadway_drag_context_drag_status (GdkDragContext *context,
- GdkDragAction action,
- guint32 time)
+ GdkDragAction action,
+ guint32 time)
{
g_return_if_fail (context != NULL);
}
static void
gdk_broadway_drag_context_drop_reply (GdkDragContext *context,
- gboolean ok,
- guint32 time)
+ gboolean ok,
+ guint32 time)
{
g_return_if_fail (context != NULL);
}
static void
gdk_broadway_drag_context_drop_finish (GdkDragContext *context,
- gboolean success,
- guint32 time)
+ gboolean success,
+ guint32 time)
{
g_return_if_fail (context != NULL);
}
void
-_gdk_broadway_surface_register_dnd (GdkSurface *window)
+_gdk_broadway_surface_register_dnd (GdkSurface *surface)
{
}
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c
index 4f2e67da98..327ac016a3 100644
--- a/gdk/broadway/gdkeventsource.c
+++ b/gdk/broadway/gdkeventsource.c
@@ -88,7 +88,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
GdkDisplay *display;
GdkBroadwayDisplay *display_broadway;
GdkSeat *seat;
- GdkSurface *window;
+ GdkSurface *surface;
GdkEvent *event = NULL;
GList *node;
GSList *list, *d;
@@ -113,11 +113,11 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
switch (message->base.type) {
case BROADWAY_EVENT_ENTER:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
+ if (surface)
{
event = gdk_event_new (GDK_ENTER_NOTIFY);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->crossing.time = message->base.time;
event->crossing.x = message->pointer.win_x;
event->crossing.y = message->pointer.win_y;
@@ -133,11 +133,11 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
}
break;
case BROADWAY_EVENT_LEAVE:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
+ if (surface)
{
event = gdk_event_new (GDK_LEAVE_NOTIFY);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->crossing.time = message->base.time;
event->crossing.x = message->pointer.win_x;
event->crossing.y = message->pointer.win_y;
@@ -156,11 +156,11 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
if (_gdk_broadway_moveresize_handle_event (display, message))
break;
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
+ if (surface)
{
event = gdk_event_new (GDK_MOTION_NOTIFY);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->motion.time = message->base.time;
event->motion.x = message->pointer.win_x;
event->motion.y = message->pointer.win_y;
@@ -180,11 +180,11 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
_gdk_broadway_moveresize_handle_event (display, message))
break;
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
+ if (surface)
{
event = gdk_event_new (message->base.type == 'b' ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->button.time = message->base.time;
event->button.x = message->pointer.win_x;
event->button.y = message->pointer.win_y;
@@ -200,11 +200,11 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_SCROLL:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->pointer.event_surface_id));
+ if (surface)
{
event = gdk_event_new (GDK_SCROLL);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->scroll.time = message->base.time;
event->scroll.x = message->pointer.win_x;
event->scroll.y = message->pointer.win_y;
@@ -219,8 +219,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_TOUCH:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->touch.event_surface_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER
(message->touch.event_surface_id));
+ if (surface)
{
GdkEventType event_type = 0;
@@ -243,7 +243,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
event = gdk_event_new (event_type);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->touch.sequence = GUINT_TO_POINTER(message->touch.sequence_id);
event->touch.emulating_pointer = message->touch.is_emulated;
event->touch.time = message->base.time;
@@ -274,12 +274,12 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_KEY_PRESS:
case BROADWAY_EVENT_KEY_RELEASE:
- window = g_hash_table_lookup (display_broadway->id_ht,
+ surface = g_hash_table_lookup (display_broadway->id_ht,
GINT_TO_POINTER (message->key.surface_id));
- if (window)
+ if (surface)
{
event = gdk_event_new (message->base.type == 'k' ? GDK_KEY_PRESS : GDK_KEY_RELEASE);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->key.time = message->base.time;
event->key.keyval = message->key.key;
event->key.state = message->key.state;
@@ -299,14 +299,14 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->configure_notify.id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->configure_notify.id));
+ if (surface)
{
- window->x = message->configure_notify.x;
- window->y = message->configure_notify.y;
+ surface->x = message->configure_notify.x;
+ surface->y = message->configure_notify.y;
event = gdk_event_new (GDK_CONFIGURE);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->configure.x = message->configure_notify.x;
event->configure.y = message->configure_notify.y;
event->configure.width = message->configure_notify.width;
@@ -315,20 +315,20 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
- if (window->resize_count >= 1)
+ if (surface->resize_count >= 1)
{
- window->resize_count -= 1;
+ surface->resize_count -= 1;
- if (window->resize_count == 0)
- _gdk_broadway_moveresize_configure_done (display, window);
+ if (surface->resize_count == 0)
+ _gdk_broadway_moveresize_configure_done (display, surface);
}
}
break;
case BROADWAY_EVENT_ROUNDTRIP_NOTIFY:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->roundtrip_notify.id));
- if (window)
- _gdk_broadway_roundtrip_notify (window, message->roundtrip_notify.tag,
message->roundtrip_notify.local);
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->roundtrip_notify.id));
+ if (surface)
+ _gdk_broadway_roundtrip_notify (surface, message->roundtrip_notify.tag,
message->roundtrip_notify.local);
break;
case BROADWAY_EVENT_SCREEN_SIZE_CHANGED:
@@ -336,21 +336,21 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_FOCUS:
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->focus.old_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->focus.old_id));
+ if (surface)
{
event = gdk_event_new (GDK_FOCUS_CHANGE);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
event->focus_change.in = FALSE;
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
}
- window = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->focus.new_id));
- if (window)
+ surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->focus.new_id));
+ if (surface)
{
event = gdk_event_new (GDK_FOCUS_CHANGE);
- event->any.surface = g_object_ref (window);
+ event->any.surface = g_object_ref (surface);
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/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h
index b899517cd2..db4ce7619b 100644
--- a/gdk/broadway/gdkprivate-broadway.h
+++ b/gdk/broadway/gdkprivate-broadway.h
@@ -37,47 +37,45 @@
#include "gdkbroadwaycursor.h"
#include "gdkbroadwaysurface.h"
-void _gdk_broadway_resync_windows (void);
-
guint32 gdk_broadway_display_ensure_texture (GdkDisplay *display,
- GdkTexture *texture);
-
-void gdk_broadway_surface_set_nodes (GdkSurface *window,
- GArray *nodes,
- GPtrArray *node_textures);
-
-void _gdk_broadway_surface_register_dnd (GdkSurface *window);
-GdkDragContext * _gdk_broadway_surface_drag_begin (GdkSurface *window,
- GdkDevice *device,
- GdkContentProvider *content,
- GdkDragAction actions,
- gint dx,
- gint dy);
-void _gdk_broadway_surface_translate (GdkSurface *window,
- cairo_region_t *area,
- gint dx,
- gint dy);
-gboolean _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
- BroadwayInputMsg *msg);
-gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
- GdkSurface *window);
-void _gdk_broadway_roundtrip_notify (GdkSurface *window,
- guint32 tag,
- gboolean local_reply);
-void _gdk_broadway_surface_grab_check_destroy (GdkSurface *window);
-void _gdk_broadway_surface_grab_check_unmap (GdkSurface *window,
- gulong serial);
+ GdkTexture *texture);
+
+void gdk_broadway_surface_set_nodes (GdkSurface *surface,
+ GArray *nodes,
+ GPtrArray *node_textures);
+
+void _gdk_broadway_surface_register_dnd (GdkSurface *surface);
+GdkDragContext * _gdk_broadway_surface_drag_begin (GdkSurface *surface,
+ GdkDevice *device,
+ GdkContentProvider *content,
+ GdkDragAction actions,
+ gint dx,
+ gint dy);
+void _gdk_broadway_surface_translate (GdkSurface *surface,
+ cairo_region_t *area,
+ gint dx,
+ gint dy);
+gboolean _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
+ BroadwayInputMsg *msg);
+gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
+ GdkSurface *surface);
+void _gdk_broadway_roundtrip_notify (GdkSurface *surface,
+ guint32 tag,
+ gboolean local_reply);
+void _gdk_broadway_surface_grab_check_destroy (GdkSurface *surface);
+void _gdk_broadway_surface_grab_check_unmap (GdkSurface *surface,
+ gulong serial);
void _gdk_keymap_keys_changed (GdkDisplay *display);
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,
- GdkModifierType state);
+ GdkModifierType state);
void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap,
GdkModifierType *modifiers);
gboolean _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
- guint keycode);
+ guint keycode);
void _gdk_broadway_display_size_changed (GdkDisplay *display,
- BroadwayInputScreenResizeNotify *msg);
+ BroadwayInputScreenResizeNotify *msg);
void _gdk_broadway_events_got_input (BroadwayInputMsg *message);
@@ -86,7 +84,7 @@ void _gdk_broadway_display_init_dnd (GdkDisplay *display);
GdkDisplay * _gdk_broadway_display_open (const gchar *display_name);
void _gdk_broadway_display_queue_events (GdkDisplay *display);
GdkCursor*_gdk_broadway_display_get_cursor_for_name (GdkDisplay *display,
- const gchar *name);
+ const gchar *name);
GdkCursor *_gdk_broadway_display_get_cursor_for_texture (GdkDisplay *display,
GdkTexture *texture,
int x,
@@ -94,33 +92,33 @@ GdkCursor *_gdk_broadway_display_get_cursor_for_texture (GdkDisplay *display,
gboolean _gdk_broadway_display_supports_cursor_alpha (GdkDisplay *display);
gboolean _gdk_broadway_display_supports_cursor_color (GdkDisplay *display);
void _gdk_broadway_display_get_default_cursor_size (GdkDisplay *display,
- guint *width,
- guint *height);
+ guint *width,
+ guint *height);
void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
- guint *width,
- guint *height);
-void _gdk_broadway_display_create_surface_impl (GdkDisplay *display,
- GdkSurface *window,
- GdkSurface *real_parent,
- GdkEventMask event_mask,
- GdkSurfaceAttr *attributes);
+ guint *width,
+ guint *height);
+void _gdk_broadway_display_create_surface_impl (GdkDisplay *display,
+ GdkSurface *surface,
+ GdkSurface *real_parent,
+ GdkEventMask event_mask,
+ GdkSurfaceAttr *attributes);
gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
+ GdkAtom encoding,
+ gint format,
+ const guchar *text,
+ gint length,
+ gchar ***list);
gchar *_gdk_broadway_display_utf8_to_string_target (GdkDisplay *display,
- const gchar *str);
+ const gchar *str);
GdkKeymap* _gdk_broadway_display_get_keymap (GdkDisplay *display);
void _gdk_broadway_display_consume_all_input (GdkDisplay *display);
BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
- char op,
- guint32 serial,
- gboolean remove);
+ char op,
+ guint32 serial,
+ gboolean remove);
-/* Window methods - testing */
-void _gdk_broadway_surface_resize_surface (GdkSurface *window);
+/* Surface methods - testing */
+void _gdk_broadway_surface_resize_surface (GdkSurface *surface);
void _gdk_broadway_cursor_update_theme (GdkCursor *cursor);
void _gdk_broadway_cursor_display_finalize (GdkDisplay *display);
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index 0d71b59e50..790a240b1f 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -46,8 +46,8 @@
/* Forward declarations */
static void gdk_surface_impl_broadway_finalize (GObject *object);
-#define SURFACE_IS_TOPLEVEL(window) \
- (GDK_SURFACE_TYPE (window) != GDK_SURFACE_CHILD)
+#define SURFACE_IS_TOPLEVEL(surface) \
+ (GDK_SURFACE_TYPE (surface) != GDK_SURFACE_CHILD)
struct _GdkBroadwaySurface {
GdkSurface parent;
@@ -87,7 +87,7 @@ find_broadway_display (void)
if (GDK_IS_BROADWAY_DISPLAY (l->data))
{
display = l->data;
- break;
+ break;
}
}
g_slist_free (list);
@@ -108,10 +108,10 @@ flush_idle (gpointer data)
}
/* We need to flush in an idle rather than AFTER_PAINT, as the clock
- is frozen during e.g. window resizes so the paint will not happen
- and the window resize request is never flushed. */
+ is frozen during e.g. surface resizes so the paint will not happen
+ and the surface resize request is never flushed. */
static void
-queue_flush (GdkSurface *window)
+queue_flush (GdkSurface *surface)
{
if (flush_id == 0)
{
@@ -162,11 +162,11 @@ thaw_clock_cb (GdkFrameClock *clock)
}
void
-_gdk_broadway_roundtrip_notify (GdkSurface *window,
+_gdk_broadway_roundtrip_notify (GdkSurface *surface,
guint32 tag,
gboolean local_reply)
{
- GdkFrameClock *clock = gdk_surface_get_frame_clock (window);
+ GdkFrameClock *clock = gdk_surface_get_frame_clock (surface);
/* If there is no remove web client, rate limit update to once a second */
if (local_reply)
@@ -177,13 +177,13 @@ _gdk_broadway_roundtrip_notify (GdkSurface *window,
static void
on_frame_clock_after_paint (GdkFrameClock *clock,
- GdkSurface *window)
+ GdkSurface *surface)
{
- GdkDisplay *display = gdk_surface_get_display (window);
- GdkSurfaceImplBroadway *impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ GdkDisplay *display = gdk_surface_get_display (surface);
+ GdkSurfaceImplBroadway *impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
GdkBroadwayDisplay *broadway_display;
- _gdk_frame_clock_freeze (gdk_surface_get_frame_clock (window));
+ _gdk_frame_clock_freeze (gdk_surface_get_frame_clock (surface));
broadway_display = GDK_BROADWAY_DISPLAY (display);
@@ -193,23 +193,23 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
}
static void
-connect_frame_clock (GdkSurface *window)
+connect_frame_clock (GdkSurface *surface)
{
- if (SURFACE_IS_TOPLEVEL (window))
+ if (SURFACE_IS_TOPLEVEL (surface))
{
- GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (window);
+ GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (surface);
g_signal_connect (frame_clock, "after-paint",
- G_CALLBACK (on_frame_clock_after_paint), window);
+ G_CALLBACK (on_frame_clock_after_paint), surface);
}
}
void
_gdk_broadway_display_create_surface_impl (GdkDisplay *display,
- GdkSurface *window,
- GdkSurface *real_parent,
- GdkEventMask event_mask,
- GdkSurfaceAttr *attributes)
+ GdkSurface *surface,
+ GdkSurface *real_parent,
+ GdkEventMask event_mask,
+ GdkSurfaceAttr *attributes)
{
GdkSurfaceImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
@@ -217,31 +217,31 @@ _gdk_broadway_display_create_surface_impl (GdkDisplay *display,
broadway_display = GDK_BROADWAY_DISPLAY (display);
impl = g_object_new (GDK_TYPE_SURFACE_IMPL_BROADWAY, NULL);
- window->impl = (GdkSurfaceImpl *)impl;
+ surface->impl = (GdkSurfaceImpl *)impl;
impl->id = _gdk_broadway_server_new_surface (broadway_display->server,
- window->x,
- window->y,
- window->width,
- window->height,
- window->surface_type == GDK_SURFACE_TEMP);
- g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER(impl->id), window);
- impl->wrapper = window;
-
- g_assert (window->surface_type == GDK_SURFACE_TOPLEVEL ||
- window->surface_type == GDK_SURFACE_TEMP);
- g_assert (window->parent == NULL);
+ surface->x,
+ surface->y,
+ surface->width,
+ surface->height,
+ surface->surface_type == GDK_SURFACE_TEMP);
+ g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER(impl->id), surface);
+ impl->wrapper = surface;
+
+ g_assert (surface->surface_type == GDK_SURFACE_TOPLEVEL ||
+ surface->surface_type == GDK_SURFACE_TEMP);
+ g_assert (surface->parent == NULL);
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
- connect_frame_clock (window);
+ connect_frame_clock (surface);
}
static cairo_surface_t *
-gdk_surface_broadway_ref_cairo_surface (GdkSurface *window)
+gdk_surface_broadway_ref_cairo_surface (GdkSurface *surface)
{
- GdkSurfaceImplBroadway *impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ GdkSurfaceImplBroadway *impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
- if (GDK_IS_SURFACE_IMPL_BROADWAY (window) &&
+ if (GDK_IS_SURFACE_IMPL_BROADWAY (surface) &&
GDK_SURFACE_DESTROYED (impl->wrapper))
return NULL;
@@ -249,25 +249,25 @@ gdk_surface_broadway_ref_cairo_surface (GdkSurface *window)
}
static void
-_gdk_broadway_surface_destroy (GdkSurface *window,
- gboolean recursing,
- gboolean foreign_destroy)
+_gdk_broadway_surface_destroy (GdkSurface *surface,
+ gboolean recursing,
+ gboolean foreign_destroy)
{
GdkSurfaceImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
if (impl->node_data)
g_array_unref (impl->node_data);
if (impl->node_data_textures)
g_ptr_array_unref (impl->node_data_textures);
- _gdk_broadway_surface_grab_check_destroy (window);
+ _gdk_broadway_surface_grab_check_destroy (surface);
- broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (window));
+ broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER (impl->id));
_gdk_broadway_server_destroy_surface (broadway_display->server, impl->id);
@@ -275,18 +275,18 @@ _gdk_broadway_surface_destroy (GdkSurface *window,
}
void
-gdk_broadway_surface_set_nodes (GdkSurface *window,
- GArray *nodes,
- GPtrArray *node_textures)
+gdk_broadway_surface_set_nodes (GdkSurface *surface,
+ GArray *nodes,
+ GPtrArray *node_textures)
{
GdkSurfaceImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
- broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (window));
+ broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
if (nodes)
g_array_ref (nodes);
@@ -303,85 +303,86 @@ gdk_broadway_surface_set_nodes (GdkSurface *window,
gdk_broadway_server_surface_set_nodes (broadway_display->server, impl->id, impl->node_data);
}
-/* This function is called when the XWindow is really gone.
+/* This function is called when the XSurface is really gone.
*/
static void
-gdk_broadway_surface_destroy_notify (GdkSurface *window)
+gdk_broadway_surface_destroy_notify (GdkSurface *surface)
{
- if (!GDK_SURFACE_DESTROYED (window))
- _gdk_surface_destroy (window, TRUE);
+ if (!GDK_SURFACE_DESTROYED (surface))
+ _gdk_surface_destroy (surface, TRUE);
- g_object_unref (window);
+ g_object_unref (surface);
}
static void
-gdk_surface_broadway_show (GdkSurface *window, gboolean already_mapped)
+gdk_surface_broadway_show (GdkSurface *surface,
+ gboolean already_mapped)
{
GdkSurfaceImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
impl->visible = TRUE;
- if (window->event_mask & GDK_STRUCTURE_MASK)
- _gdk_make_event (GDK_SURFACE (window), GDK_MAP, NULL, FALSE);
+ if (surface->event_mask & GDK_STRUCTURE_MASK)
+ _gdk_make_event (GDK_SURFACE (surface), GDK_MAP, NULL, FALSE);
- if (window->parent && window->parent->event_mask & GDK_SUBSTRUCTURE_MASK)
- _gdk_make_event (GDK_SURFACE (window), GDK_MAP, NULL, FALSE);
+ if (surface->parent && surface->parent->event_mask & GDK_SUBSTRUCTURE_MASK)
+ _gdk_make_event (GDK_SURFACE (surface), GDK_MAP, NULL, FALSE);
- broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (window));
+ broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
if (_gdk_broadway_server_surface_show (broadway_display->server, impl->id))
- queue_flush (window);
+ queue_flush (surface);
}
static void
-gdk_surface_broadway_hide (GdkSurface *window)
+gdk_surface_broadway_hide (GdkSurface *surface)
{
GdkSurfaceImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
impl->visible = FALSE;
- if (window->event_mask & GDK_STRUCTURE_MASK)
- _gdk_make_event (GDK_SURFACE (window), GDK_UNMAP, NULL, FALSE);
+ if (surface->event_mask & GDK_STRUCTURE_MASK)
+ _gdk_make_event (GDK_SURFACE (surface), GDK_UNMAP, NULL, FALSE);
- if (window->parent && window->parent->event_mask & GDK_SUBSTRUCTURE_MASK)
- _gdk_make_event (GDK_SURFACE (window), GDK_UNMAP, NULL, FALSE);
+ if (surface->parent && surface->parent->event_mask & GDK_SUBSTRUCTURE_MASK)
+ _gdk_make_event (GDK_SURFACE (surface), GDK_UNMAP, NULL, FALSE);
- broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (window));
+ broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
- _gdk_broadway_surface_grab_check_unmap (window,
+ _gdk_broadway_surface_grab_check_unmap (surface,
_gdk_broadway_server_get_next_serial (broadway_display->server));
if (_gdk_broadway_server_surface_hide (broadway_display->server, impl->id))
- queue_flush (window);
+ queue_flush (surface);
- _gdk_surface_clear_update_area (window);
+ _gdk_surface_clear_update_area (surface);
}
static void
-gdk_surface_broadway_withdraw (GdkSurface *window)
+gdk_surface_broadway_withdraw (GdkSurface *surface)
{
- gdk_surface_broadway_hide (window);
+ gdk_surface_broadway_hide (surface);
}
static void
-gdk_surface_broadway_move_resize (GdkSurface *window,
- gboolean with_move,
- gint x,
- gint y,
- gint width,
- gint height)
-{
- GdkSurfaceImplBroadway *impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+gdk_surface_broadway_move_resize (GdkSurface *surface,
+ gboolean with_move,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
+{
+ GdkSurfaceImplBroadway *impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
GdkBroadwayDisplay *broadway_display;
gboolean size_changed;
size_changed = FALSE;
- broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (window));
+ broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
if (width > 0 || height > 0)
{
@@ -391,8 +392,8 @@ gdk_surface_broadway_move_resize (GdkSurface *window,
if (height < 1)
height = 1;
- if (width != window->width ||
- height != window->height)
+ if (width != surface->width ||
+ height != surface->height)
{
size_changed = TRUE;
@@ -400,8 +401,8 @@ gdk_surface_broadway_move_resize (GdkSurface *window,
impl->dirty = TRUE;
impl->last_synced = FALSE;
- window->width = width;
- window->height = height;
+ surface->width = width;
+ surface->height = height;
}
}
@@ -409,125 +410,125 @@ gdk_surface_broadway_move_resize (GdkSurface *window,
impl->id,
with_move,
x, y,
- window->width, window->height);
- queue_flush (window);
+ surface->width, surface->height);
+ queue_flush (surface);
if (size_changed)
- window->resize_count++;
+ surface->resize_count++;
}
static void
-gdk_surface_broadway_raise (GdkSurface *window)
+gdk_surface_broadway_raise (GdkSurface *surface)
{
}
static void
-gdk_surface_broadway_restack_toplevel (GdkSurface *window,
- GdkSurface *sibling,
- gboolean above)
+gdk_surface_broadway_restack_toplevel (GdkSurface *surface,
+ GdkSurface *sibling,
+ gboolean above)
{
}
static void
-gdk_surface_broadway_lower (GdkSurface *window)
+gdk_surface_broadway_lower (GdkSurface *surface)
{
}
static void
-gdk_broadway_surface_focus (GdkSurface *window,
- guint32 timestamp)
+gdk_broadway_surface_focus (GdkSurface *surface,
+ guint32 timestamp)
{
GdkSurfaceImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (window) ||
- !window->accept_focus)
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !surface->accept_focus)
return;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
- broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (window));
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
+ broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
_gdk_broadway_server_surface_focus (broadway_display->server,
impl->id);
}
static void
-gdk_broadway_surface_set_type_hint (GdkSurface *window,
- GdkSurfaceTypeHint hint)
+gdk_broadway_surface_set_type_hint (GdkSurface *surface,
+ GdkSurfaceTypeHint hint)
{
}
static GdkSurfaceTypeHint
-gdk_broadway_surface_get_type_hint (GdkSurface *window)
+gdk_broadway_surface_get_type_hint (GdkSurface *surface)
{
return GDK_SURFACE_TYPE_HINT_NORMAL;
}
static void
-gdk_broadway_surface_set_modal_hint (GdkSurface *window,
- gboolean modal)
+gdk_broadway_surface_set_modal_hint (GdkSurface *surface,
+ gboolean modal)
{
}
static void
-gdk_broadway_surface_set_skip_taskbar_hint (GdkSurface *window,
- gboolean skips_taskbar)
+gdk_broadway_surface_set_skip_taskbar_hint (GdkSurface *surface,
+ gboolean skips_taskbar)
{
}
static void
-gdk_broadway_surface_set_skip_pager_hint (GdkSurface *window,
- gboolean skips_pager)
+gdk_broadway_surface_set_skip_pager_hint (GdkSurface *surface,
+ gboolean skips_pager)
{
}
static void
-gdk_broadway_surface_set_urgency_hint (GdkSurface *window,
- gboolean urgent)
+gdk_broadway_surface_set_urgency_hint (GdkSurface *surface,
+ gboolean urgent)
{
}
static void
-gdk_broadway_surface_set_geometry_hints (GdkSurface *window,
- const GdkGeometry *geometry,
- GdkSurfaceHints geom_mask)
+gdk_broadway_surface_set_geometry_hints (GdkSurface *surface,
+ const GdkGeometry *geometry,
+ GdkSurfaceHints geom_mask)
{
GdkSurfaceImplBroadway *impl;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
impl->geometry_hints = *geometry;
impl->geometry_hints_mask = geom_mask;
}
static void
-gdk_broadway_surface_set_title (GdkSurface *window,
- const gchar *title)
+gdk_broadway_surface_set_title (GdkSurface *surface,
+ const gchar *title)
{
}
static void
-gdk_broadway_surface_set_role (GdkSurface *window,
- const gchar *role)
+gdk_broadway_surface_set_role (GdkSurface *surface,
+ const gchar *role)
{
}
static void
-gdk_broadway_surface_set_startup_id (GdkSurface *window,
- const gchar *startup_id)
+gdk_broadway_surface_set_startup_id (GdkSurface *surface,
+ const gchar *startup_id)
{
}
static void
-gdk_broadway_surface_set_transient_for (GdkSurface *window,
- GdkSurface *parent)
+gdk_broadway_surface_set_transient_for (GdkSurface *surface,
+ GdkSurface *parent)
{
GdkBroadwayDisplay *display;
GdkSurfaceImplBroadway *impl;
int parent_id;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
parent_id = 0;
if (parent)
@@ -540,17 +541,17 @@ gdk_broadway_surface_set_transient_for (GdkSurface *window,
}
static void
-gdk_surface_broadway_get_geometry (GdkSurface *window,
- gint *x,
- gint *y,
- gint *width,
- gint *height)
+gdk_surface_broadway_get_geometry (GdkSurface *surface,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height)
{
GdkSurfaceImplBroadway *impl;
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
/* TODO: These should really roundtrip to the client to get the current data */
@@ -566,15 +567,15 @@ gdk_surface_broadway_get_geometry (GdkSurface *window,
}
static void
-gdk_surface_broadway_get_root_coords (GdkSurface *window,
- gint x,
- gint y,
- gint *root_x,
- gint *root_y)
+gdk_surface_broadway_get_root_coords (GdkSurface *surface,
+ gint x,
+ gint y,
+ gint *root_x,
+ gint *root_y)
{
GdkSurfaceImplBroadway *impl;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
if (root_x)
*root_x = x + impl->wrapper->x;
@@ -583,34 +584,34 @@ gdk_surface_broadway_get_root_coords (GdkSurface *window,
}
static void
-gdk_broadway_surface_get_frame_extents (GdkSurface *window,
- GdkRectangle *rect)
+gdk_broadway_surface_get_frame_extents (GdkSurface *surface,
+ GdkRectangle *rect)
{
g_return_if_fail (rect != NULL);
/* TODO: This should take wm frame into account */
- rect->x = window->x;
- rect->y = window->y;
- rect->width = window->width;
- rect->height = window->height;
+ rect->x = surface->x;
+ rect->y = surface->y;
+ rect->width = surface->width;
+ rect->height = surface->height;
}
static gboolean
-gdk_surface_broadway_get_device_state (GdkSurface *window,
- GdkDevice *device,
- gdouble *x,
- gdouble *y,
- GdkModifierType *mask)
+gdk_surface_broadway_get_device_state (GdkSurface *surface,
+ GdkDevice *device,
+ gdouble *x,
+ gdouble *y,
+ GdkModifierType *mask)
{
GdkSurface *child;
- g_return_val_if_fail (window == NULL || GDK_IS_SURFACE (window), FALSE);
+ g_return_val_if_fail (surface == NULL || GDK_IS_SURFACE (surface), FALSE);
- if (GDK_SURFACE_DESTROYED (window))
+ if (GDK_SURFACE_DESTROYED (surface))
return FALSE;
- GDK_DEVICE_GET_CLASS (device)->query_state (device, window,
+ GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
&child,
NULL, NULL,
x, y, mask);
@@ -618,170 +619,170 @@ gdk_surface_broadway_get_device_state (GdkSurface *window,
}
static GdkEventMask
-gdk_surface_broadway_get_events (GdkSurface *window)
+gdk_surface_broadway_get_events (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window))
+ if (GDK_SURFACE_DESTROYED (surface))
return 0;
return 0;
}
static void
-gdk_surface_broadway_set_events (GdkSurface *window,
- GdkEventMask event_mask)
+gdk_surface_broadway_set_events (GdkSurface *surface,
+ GdkEventMask event_mask)
{
- if (!GDK_SURFACE_DESTROYED (window))
+ if (!GDK_SURFACE_DESTROYED (surface))
{
}
}
static void
-gdk_surface_broadway_shape_combine_region (GdkSurface *window,
- const cairo_region_t *shape_region,
- gint offset_x,
- gint offset_y)
+gdk_surface_broadway_shape_combine_region (GdkSurface *surface,
+ const cairo_region_t *shape_region,
+ gint offset_x,
+ gint offset_y)
{
}
static void
-gdk_surface_broadway_input_shape_combine_region (GdkSurface *window,
- const cairo_region_t *shape_region,
- gint offset_x,
- gint offset_y)
+gdk_surface_broadway_input_shape_combine_region (GdkSurface *surface,
+ const cairo_region_t *shape_region,
+ gint offset_x,
+ gint offset_y)
{
}
static void
-gdk_broadway_surface_set_accept_focus (GdkSurface *window,
- gboolean accept_focus)
+gdk_broadway_surface_set_accept_focus (GdkSurface *surface,
+ gboolean accept_focus)
{
accept_focus = accept_focus != FALSE;
- if (window->accept_focus != accept_focus)
+ if (surface->accept_focus != accept_focus)
{
- window->accept_focus = accept_focus;
+ surface->accept_focus = accept_focus;
}
}
static void
-gdk_broadway_surface_set_focus_on_map (GdkSurface *window,
- gboolean focus_on_map)
+gdk_broadway_surface_set_focus_on_map (GdkSurface *surface,
+ gboolean focus_on_map)
{
focus_on_map = focus_on_map != FALSE;
- if (window->focus_on_map != focus_on_map)
+ if (surface->focus_on_map != focus_on_map)
{
- window->focus_on_map = focus_on_map;
+ surface->focus_on_map = focus_on_map;
}
}
static void
-gdk_broadway_surface_set_icon_list (GdkSurface *window,
- GList *surfaces)
+gdk_broadway_surface_set_icon_list (GdkSurface *surface,
+ GList *surfaces)
{
}
static void
-gdk_broadway_surface_set_icon_name (GdkSurface *window,
+gdk_broadway_surface_set_icon_name (GdkSurface *surface,
const gchar *name)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
- g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"),
+ g_object_set_qdata (G_OBJECT (surface), g_quark_from_static_string ("gdk-icon-name-set"),
GUINT_TO_POINTER (name != NULL));
}
static void
-gdk_broadway_surface_iconify (GdkSurface *window)
+gdk_broadway_surface_iconify (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_deiconify (GdkSurface *window)
+gdk_broadway_surface_deiconify (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_stick (GdkSurface *window)
+gdk_broadway_surface_stick (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_unstick (GdkSurface *window)
+gdk_broadway_surface_unstick (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_maximize (GdkSurface *window)
+gdk_broadway_surface_maximize (GdkSurface *surface)
{
GdkSurfaceImplBroadway *impl;
GdkDisplay *display;
GdkMonitor *monitor;
GdkRectangle geom;
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
if (impl->maximized)
return;
impl->maximized = TRUE;
- gdk_synthesize_surface_state (window, 0, GDK_SURFACE_STATE_MAXIMIZED);
+ gdk_synthesize_surface_state (surface, 0, GDK_SURFACE_STATE_MAXIMIZED);
- impl->pre_maximize_x = window->x;
- impl->pre_maximize_y = window->y;
- impl->pre_maximize_width = window->width;
- impl->pre_maximize_height = window->height;
+ impl->pre_maximize_x = surface->x;
+ impl->pre_maximize_y = surface->y;
+ impl->pre_maximize_width = surface->width;
+ impl->pre_maximize_height = surface->height;
- display = gdk_surface_get_display (window);
+ display = gdk_surface_get_display (surface);
monitor = gdk_display_get_primary_monitor (display);
gdk_monitor_get_geometry (monitor, &geom);
- gdk_surface_move_resize (window,
+ gdk_surface_move_resize (surface,
geom.x, geom.y,
geom.width, geom.height);
}
static void
-gdk_broadway_surface_unmaximize (GdkSurface *window)
+gdk_broadway_surface_unmaximize (GdkSurface *surface)
{
GdkSurfaceImplBroadway *impl;
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
if (!impl->maximized)
return;
impl->maximized = FALSE;
- gdk_synthesize_surface_state (window, GDK_SURFACE_STATE_MAXIMIZED, 0);
+ gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_MAXIMIZED, 0);
- gdk_surface_move_resize (window,
+ gdk_surface_move_resize (surface,
impl->pre_maximize_x,
impl->pre_maximize_y,
impl->pre_maximize_width,
@@ -789,101 +790,101 @@ gdk_broadway_surface_unmaximize (GdkSurface *window)
}
static void
-gdk_broadway_surface_fullscreen (GdkSurface *window)
+gdk_broadway_surface_fullscreen (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_unfullscreen (GdkSurface *window)
+gdk_broadway_surface_unfullscreen (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_set_keep_above (GdkSurface *window,
- gboolean setting)
+gdk_broadway_surface_set_keep_above (GdkSurface *surface,
+ gboolean setting)
{
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_set_keep_below (GdkSurface *window, gboolean setting)
+gdk_broadway_surface_set_keep_below (GdkSurface *surface, gboolean setting)
{
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static GdkSurface *
-gdk_broadway_surface_get_group (GdkSurface *window)
+gdk_broadway_surface_get_group (GdkSurface *surface)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return NULL;
- return window;
+ return surface;
}
static void
-gdk_broadway_surface_set_group (GdkSurface *window,
- GdkSurface *leader)
+gdk_broadway_surface_set_group (GdkSurface *surface,
+ GdkSurface *leader)
{
}
static void
-gdk_broadway_surface_set_decorations (GdkSurface *window,
- GdkWMDecoration decorations)
+gdk_broadway_surface_set_decorations (GdkSurface *surface,
+ GdkWMDecoration decorations)
{
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static gboolean
-gdk_broadway_surface_get_decorations (GdkSurface *window,
- GdkWMDecoration *decorations)
+gdk_broadway_surface_get_decorations (GdkSurface *surface,
+ GdkWMDecoration *decorations)
{
gboolean result = FALSE;
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return FALSE;
return result;
}
static void
-gdk_broadway_surface_set_functions (GdkSurface *window,
- GdkWMFunction functions)
+gdk_broadway_surface_set_functions (GdkSurface *surface,
+ GdkWMFunction functions)
{
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
}
static void
-gdk_broadway_surface_end_paint (GdkSurface *window)
+gdk_broadway_surface_end_paint (GdkSurface *surface)
{
GdkSurfaceImplBroadway *impl;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
impl->dirty = TRUE;
}
@@ -893,8 +894,8 @@ struct _MoveResizeData
{
GdkDisplay *display;
- GdkSurface *moveresize_window;
- GdkSurface *moveresize_emulation_window;
+ GdkSurface *moveresize_surface;
+ GdkSurface *moveresize_emulation_surface;
gboolean is_resize;
GdkSurfaceEdge resize_edge;
gint moveresize_button;
@@ -1004,7 +1005,7 @@ update_pos (MoveResizeData *mv_resize,
w, h, &w, &h);
}
- gdk_surface_move_resize (mv_resize->moveresize_window, x, y, w, h);
+ gdk_surface_move_resize (mv_resize->moveresize_surface, x, y, w, h);
}
else
{
@@ -1013,17 +1014,17 @@ update_pos (MoveResizeData *mv_resize,
x = mv_resize->moveresize_orig_x + dx;
y = mv_resize->moveresize_orig_y + dy;
- gdk_surface_move (mv_resize->moveresize_window, x, y);
+ gdk_surface_move (mv_resize->moveresize_surface, x, y);
}
}
static void
finish_drag (MoveResizeData *mv_resize)
{
- gdk_surface_destroy (mv_resize->moveresize_emulation_window);
- mv_resize->moveresize_emulation_window = NULL;
- g_object_unref (mv_resize->moveresize_window);
- mv_resize->moveresize_window = NULL;
+ gdk_surface_destroy (mv_resize->moveresize_emulation_surface);
+ mv_resize->moveresize_emulation_surface = NULL;
+ g_object_unref (mv_resize->moveresize_surface);
+ mv_resize->moveresize_surface = NULL;
g_clear_pointer (&mv_resize->moveresize_pending_event, g_free);
}
@@ -1046,7 +1047,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
guint button_mask = 0;
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE);
- if (!mv_resize || !mv_resize->moveresize_window)
+ if (!mv_resize || !mv_resize->moveresize_surface)
return FALSE;
button_mask = GDK_BUTTON1_MASK << (mv_resize->moveresize_button - 1);
@@ -1064,7 +1065,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
}
else if (event->touch.touch_type == 1) /* UPDATE */
{
- if (mv_resize->moveresize_window->resize_count > 0)
+ if (mv_resize->moveresize_surface->resize_count > 0)
{
if (mv_resize->moveresize_pending_event)
*mv_resize->moveresize_pending_event = *event;
@@ -1082,7 +1083,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
break;
case BROADWAY_EVENT_POINTER_MOVE:
- if (mv_resize->moveresize_window->resize_count > 0)
+ if (mv_resize->moveresize_surface->resize_count > 0)
{
if (mv_resize->moveresize_pending_event)
*mv_resize->moveresize_pending_event = *event;
@@ -1125,12 +1126,12 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
gboolean
_gdk_broadway_moveresize_configure_done (GdkDisplay *display,
- GdkSurface *window)
+ GdkSurface *surface)
{
BroadwayInputMsg *tmp_event;
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE);
- if (!mv_resize || window != mv_resize->moveresize_window)
+ if (!mv_resize || surface != mv_resize->moveresize_surface)
return FALSE;
if (mv_resize->moveresize_pending_event)
@@ -1145,25 +1146,25 @@ _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
}
static void
-create_moveresize_window (MoveResizeData *mv_resize,
- guint32 timestamp)
+create_moveresize_surface (MoveResizeData *mv_resize,
+ guint32 timestamp)
{
GdkGrabStatus status;
GdkSeat *seat;
GdkDevice *pointer;
- g_assert (mv_resize->moveresize_emulation_window == NULL);
+ g_assert (mv_resize->moveresize_emulation_surface == NULL);
- mv_resize->moveresize_emulation_window = gdk_surface_new_temp (mv_resize->display);
+ mv_resize->moveresize_emulation_surface = gdk_surface_new_temp (mv_resize->display);
- gdk_surface_show (mv_resize->moveresize_emulation_window);
+ gdk_surface_show (mv_resize->moveresize_emulation_surface);
seat = gdk_display_get_default_seat (mv_resize->display);
pointer = gdk_seat_get_pointer (seat);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
status = gdk_device_grab (pointer,
- mv_resize->moveresize_emulation_window,
+ mv_resize->moveresize_emulation_surface,
GDK_OWNERSHIP_APPLICATION,
FALSE,
GDK_BUTTON_RELEASE_MASK |
@@ -1174,7 +1175,7 @@ create_moveresize_window (MoveResizeData *mv_resize,
if (status != GDK_GRAB_SUCCESS)
{
- /* If this fails, some other client has grabbed the window
+ /* If this fails, some other client has grabbed the surface
* already.
*/
finish_drag (mv_resize);
@@ -1192,14 +1193,14 @@ calculate_unmoving_origin (MoveResizeData *mv_resize)
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY &&
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC)
{
- gdk_surface_get_origin (mv_resize->moveresize_window,
+ gdk_surface_get_origin (mv_resize->moveresize_surface,
&mv_resize->moveresize_orig_x,
&mv_resize->moveresize_orig_y);
}
else
{
- gdk_surface_get_frame_extents (mv_resize->moveresize_window, &rect);
- gdk_surface_get_geometry (mv_resize->moveresize_window,
+ gdk_surface_get_frame_extents (mv_resize->moveresize_surface, &rect);
+ gdk_surface_get_geometry (mv_resize->moveresize_surface,
NULL, NULL, &width, &height);
switch (mv_resize->moveresize_geometry.win_gravity)
@@ -1250,99 +1251,99 @@ calculate_unmoving_origin (MoveResizeData *mv_resize)
}
static void
-gdk_broadway_surface_begin_resize_drag (GdkSurface *window,
- GdkSurfaceEdge edge,
- GdkDevice *device,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp)
+gdk_broadway_surface_begin_resize_drag (GdkSurface *surface,
+ GdkSurfaceEdge edge,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp)
{
MoveResizeData *mv_resize;
GdkSurfaceImplBroadway *impl;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
if (impl->maximized)
return;
- mv_resize = get_move_resize_data (gdk_surface_get_display (window), TRUE);
+ mv_resize = get_move_resize_data (gdk_surface_get_display (surface), TRUE);
mv_resize->is_resize = TRUE;
mv_resize->moveresize_button = button;
mv_resize->resize_edge = edge;
mv_resize->moveresize_x = root_x;
mv_resize->moveresize_y = root_y;
- mv_resize->moveresize_window = g_object_ref (window);
+ mv_resize->moveresize_surface = g_object_ref (surface);
- mv_resize->moveresize_orig_width = gdk_surface_get_width (window);
- mv_resize->moveresize_orig_height = gdk_surface_get_height (window);
+ mv_resize->moveresize_orig_width = gdk_surface_get_width (surface);
+ mv_resize->moveresize_orig_height = gdk_surface_get_height (surface);
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask;
mv_resize->moveresize_geometry = impl->geometry_hints;
calculate_unmoving_origin (mv_resize);
- create_moveresize_window (mv_resize, timestamp);
+ create_moveresize_surface (mv_resize, timestamp);
}
static void
-gdk_broadway_surface_begin_move_drag (GdkSurface *window,
- GdkDevice *device,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp)
+gdk_broadway_surface_begin_move_drag (GdkSurface *surface,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp)
{
MoveResizeData *mv_resize;
GdkSurfaceImplBroadway *impl;
- impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
+ impl = GDK_SURFACE_IMPL_BROADWAY (surface->impl);
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
if (impl->maximized)
return;
- mv_resize = get_move_resize_data (gdk_surface_get_display (window), TRUE);
+ mv_resize = get_move_resize_data (gdk_surface_get_display (surface), TRUE);
mv_resize->is_resize = FALSE;
mv_resize->moveresize_button = button;
mv_resize->moveresize_x = root_x;
mv_resize->moveresize_y = root_y;
- mv_resize->moveresize_window = g_object_ref (window);
+ mv_resize->moveresize_surface = g_object_ref (surface);
- mv_resize->moveresize_orig_width = gdk_surface_get_width (window);
- mv_resize->moveresize_orig_height = gdk_surface_get_height (window);
+ mv_resize->moveresize_orig_width = gdk_surface_get_width (surface);
+ mv_resize->moveresize_orig_height = gdk_surface_get_height (surface);
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask;
mv_resize->moveresize_geometry = impl->geometry_hints;
calculate_unmoving_origin (mv_resize);
- create_moveresize_window (mv_resize, timestamp);
+ create_moveresize_surface (mv_resize, timestamp);
}
static gboolean
-gdk_broadway_surface_beep (GdkSurface *window)
+gdk_broadway_surface_beep (GdkSurface *surface)
{
return FALSE;
}
static void
-gdk_broadway_surface_set_opacity (GdkSurface *window,
+gdk_broadway_surface_set_opacity (GdkSurface *surface,
gdouble opacity)
{
- g_return_if_fail (GDK_IS_SURFACE (window));
+ g_return_if_fail (GDK_IS_SURFACE (surface));
- if (GDK_SURFACE_DESTROYED (window) ||
- !SURFACE_IS_TOPLEVEL (window))
+ if (GDK_SURFACE_DESTROYED (surface) ||
+ !SURFACE_IS_TOPLEVEL (surface))
return;
if (opacity < 0)
@@ -1352,11 +1353,11 @@ gdk_broadway_surface_set_opacity (GdkSurface *window,
}
guint32
-gdk_broadway_get_last_seen_time (GdkSurface *window)
+gdk_broadway_get_last_seen_time (GdkSurface *surface)
{
GdkDisplay *display;
- display = gdk_surface_get_display (window);
+ display = gdk_surface_get_display (surface);
return _gdk_broadway_server_get_last_seen_time (GDK_BROADWAY_DISPLAY (display)->server);
}
diff --git a/gdk/broadway/gdksurface-broadway.h b/gdk/broadway/gdksurface-broadway.h
index b859ffc591..ca6a5247b1 100644
--- a/gdk/broadway/gdksurface-broadway.h
+++ b/gdk/broadway/gdksurface-broadway.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
typedef struct _GdkSurfaceImplBroadway GdkSurfaceImplBroadway;
typedef struct _GdkSurfaceImplBroadwayClass GdkSurfaceImplBroadwayClass;
-/* Window implementation for Broadway
+/* Surface implementation for Broadway
*/
#define GDK_TYPE_SURFACE_IMPL_BROADWAY (gdk_surface_impl_broadway_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]