Commit a7208d67 authored by Benjamin Otte's avatar Benjamin Otte

x11: s/GDK_DRAWABLE_DISPLAY/GDK_WINDOW_DISPLAY

parent c340fb7e
...@@ -1385,7 +1385,7 @@ motif_set_targets (GdkDragContext *context) ...@@ -1385,7 +1385,7 @@ motif_set_targets (GdkDragContext *context)
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
MotifDragInitiatorInfo info; MotifDragInitiatorInfo info;
gint i; gint i;
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
info.byte_order = local_byte_order; info.byte_order = local_byte_order;
info.protocol_version = 0; info.protocol_version = 0;
...@@ -1465,7 +1465,7 @@ motif_send_enter (GdkDragContext *context, ...@@ -1465,7 +1465,7 @@ motif_send_enter (GdkDragContext *context,
guint32 time) guint32 time)
{ {
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
if (!G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client)) if (!G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
...@@ -1500,7 +1500,7 @@ static void ...@@ -1500,7 +1500,7 @@ static void
motif_send_leave (GdkDragContext *context, motif_send_leave (GdkDragContext *context,
guint32 time) guint32 time)
{ {
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
...@@ -1532,7 +1532,7 @@ motif_send_motion (GdkDragContext *context, ...@@ -1532,7 +1532,7 @@ motif_send_motion (GdkDragContext *context,
guint32 time) guint32 time)
{ {
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
gboolean retval; gboolean retval;
XEvent xev; XEvent xev;
...@@ -1580,7 +1580,7 @@ static void ...@@ -1580,7 +1580,7 @@ static void
motif_send_drop (GdkDragContext *context, guint32 time) motif_send_drop (GdkDragContext *context, guint32 time)
{ {
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
...@@ -1685,7 +1685,7 @@ motif_drag_context_new (GdkWindow *dest_window, ...@@ -1685,7 +1685,7 @@ motif_drag_context_new (GdkWindow *dest_window,
{ {
GdkDragContext *new_context; GdkDragContext *new_context;
GdkDragContextPrivateX11 *private; GdkDragContextPrivateX11 *private;
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (dest_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (dest_window);
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
/* FIXME, current_dest_drag really shouldn't be NULL'd /* FIXME, current_dest_drag really shouldn't be NULL'd
...@@ -1752,7 +1752,7 @@ motif_top_level_enter (GdkEvent *event, ...@@ -1752,7 +1752,7 @@ motif_top_level_enter (GdkEvent *event,
guint32 source_window, guint32 source_window,
guint32 atom) guint32 atom)
{ {
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window)); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GdkDragContext *new_context; GdkDragContext *new_context;
GDK_NOTE(DND, g_message ("Motif DND top level enter: flags: %#4x time: %d source_widow: %#4x atom: %d", GDK_NOTE(DND, g_message ("Motif DND top level enter: flags: %#4x time: %d source_widow: %#4x atom: %d",
...@@ -1776,7 +1776,7 @@ motif_top_level_leave (GdkEvent *event, ...@@ -1776,7 +1776,7 @@ motif_top_level_leave (GdkEvent *event,
guint16 flags, guint16 flags,
guint32 timestamp) guint32 timestamp)
{ {
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window)); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND top level leave: flags: %#4x time: %d", GDK_NOTE(DND, g_message ("Motif DND top level leave: flags: %#4x time: %d",
flags, timestamp)); flags, timestamp));
...@@ -1805,7 +1805,7 @@ motif_motion (GdkEvent *event, ...@@ -1805,7 +1805,7 @@ motif_motion (GdkEvent *event,
gint16 y_root) gint16 y_root)
{ {
GdkDragContextPrivateX11 *private; GdkDragContextPrivateX11 *private;
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window)); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND motion: flags: %#4x time: %d (%d, %d)", GDK_NOTE(DND, g_message ("Motif DND motion: flags: %#4x time: %d (%d, %d)",
flags, timestamp, x_root, y_root)); flags, timestamp, x_root, y_root));
...@@ -1844,7 +1844,7 @@ motif_operation_changed (GdkEvent *event, ...@@ -1844,7 +1844,7 @@ motif_operation_changed (GdkEvent *event,
guint32 timestamp) guint32 timestamp)
{ {
GdkDragContextPrivateX11 *private; GdkDragContextPrivateX11 *private;
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window)); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND operation changed: flags: %#4x time: %d", GDK_NOTE(DND, g_message ("Motif DND operation changed: flags: %#4x time: %d",
flags, timestamp)); flags, timestamp));
...@@ -1883,7 +1883,7 @@ motif_drop_start (GdkEvent *event, ...@@ -1883,7 +1883,7 @@ motif_drop_start (GdkEvent *event,
gint16 y_root) gint16 y_root)
{ {
GdkDragContext *new_context; GdkDragContext *new_context;
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window)); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND drop start: flags: %#4x time: %d (%d, %d) source_widow: %#4x atom: %d", GDK_NOTE(DND, g_message ("Motif DND drop start: flags: %#4x time: %d (%d, %d) source_widow: %#4x atom: %d",
flags, timestamp, x_root, y_root, source_window, atom)); flags, timestamp, x_root, y_root, source_window, atom));
...@@ -2216,7 +2216,7 @@ xdnd_set_targets (GdkDragContext *context) ...@@ -2216,7 +2216,7 @@ xdnd_set_targets (GdkDragContext *context)
GList *tmp_list = context->targets; GList *tmp_list = context->targets;
gint i; gint i;
gint n_atoms = g_list_length (context->targets); gint n_atoms = g_list_length (context->targets);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
atomlist = g_new (Atom, n_atoms); atomlist = g_new (Atom, n_atoms);
i = 0; i = 0;
...@@ -2246,7 +2246,7 @@ xdnd_set_actions (GdkDragContext *context) ...@@ -2246,7 +2246,7 @@ xdnd_set_actions (GdkDragContext *context)
gint i; gint i;
gint n_atoms; gint n_atoms;
guint actions; guint actions;
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
if (!xdnd_actions_initialized) if (!xdnd_actions_initialized)
xdnd_initialize_actions(); xdnd_initialize_actions();
...@@ -2334,9 +2334,9 @@ static GdkDisplay * ...@@ -2334,9 +2334,9 @@ static GdkDisplay *
gdk_drag_context_get_display (GdkDragContext *context) gdk_drag_context_get_display (GdkDragContext *context)
{ {
if (context->source_window) if (context->source_window)
return GDK_DRAWABLE_DISPLAY (context->source_window); return GDK_WINDOW_DISPLAY (context->source_window);
else if (context->dest_window) else if (context->dest_window)
return GDK_DRAWABLE_DISPLAY (context->dest_window); return GDK_WINDOW_DISPLAY (context->dest_window);
g_assert_not_reached (); g_assert_not_reached ();
return NULL; return NULL;
...@@ -2414,7 +2414,7 @@ xdnd_send_enter (GdkDragContext *context) ...@@ -2414,7 +2414,7 @@ xdnd_send_enter (GdkDragContext *context)
{ {
XEvent xev; XEvent xev;
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->dest_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->dest_window);
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "XdndEnter"); xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "XdndEnter");
...@@ -2465,7 +2465,7 @@ xdnd_send_enter (GdkDragContext *context) ...@@ -2465,7 +2465,7 @@ xdnd_send_enter (GdkDragContext *context)
static void static void
xdnd_send_leave (GdkDragContext *context) xdnd_send_leave (GdkDragContext *context)
{ {
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
...@@ -2497,7 +2497,7 @@ static void ...@@ -2497,7 +2497,7 @@ static void
xdnd_send_drop (GdkDragContext *context, guint32 time) xdnd_send_drop (GdkDragContext *context, guint32 time)
{ {
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
...@@ -2531,7 +2531,7 @@ xdnd_send_motion (GdkDragContext *context, ...@@ -2531,7 +2531,7 @@ xdnd_send_motion (GdkDragContext *context,
guint32 time) guint32 time)
{ {
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
...@@ -2853,7 +2853,7 @@ xdnd_enter_filter (GdkXEvent *xev, ...@@ -2853,7 +2853,7 @@ xdnd_enter_filter (GdkXEvent *xev,
get_types = ((xevent->xclient.data.l[1] & 1) != 0); get_types = ((xevent->xclient.data.l[1] & 1) != 0);
version = (xevent->xclient.data.l[1] & 0xff000000) >> 24; version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
display = GDK_DRAWABLE_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display); display_x11 = GDK_DISPLAY_X11 (display);
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
...@@ -2975,7 +2975,7 @@ xdnd_leave_filter (GdkXEvent *xev, ...@@ -2975,7 +2975,7 @@ xdnd_leave_filter (GdkXEvent *xev,
g_message ("XdndLeave: source_window: %#x", g_message ("XdndLeave: source_window: %#x",
source_window)); source_window));
display = GDK_DRAWABLE_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display); display_x11 = GDK_DISPLAY_X11 (display);
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
...@@ -3020,7 +3020,7 @@ xdnd_position_filter (GdkXEvent *xev, ...@@ -3020,7 +3020,7 @@ xdnd_position_filter (GdkXEvent *xev,
g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld", g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld",
source_window, x_root, y_root, time, action)); source_window, x_root, y_root, time, action));
display = GDK_DRAWABLE_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display); display_x11 = GDK_DISPLAY_X11 (display);
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
...@@ -3072,7 +3072,7 @@ xdnd_drop_filter (GdkXEvent *xev, ...@@ -3072,7 +3072,7 @@ xdnd_drop_filter (GdkXEvent *xev,
g_message ("XdndDrop: source_window: %#x time: %d", g_message ("XdndDrop: source_window: %#x time: %d",
source_window, time)); source_window, time));
display = GDK_DRAWABLE_DISPLAY (event->any.window); display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display); display_x11 = GDK_DISPLAY_X11 (display);
xdnd_precache_atoms (display); xdnd_precache_atoms (display);
...@@ -3720,7 +3720,7 @@ gdk_drag_status (GdkDragContext *context, ...@@ -3720,7 +3720,7 @@ gdk_drag_status (GdkDragContext *context,
g_return_if_fail (context != NULL); g_return_if_fail (context != NULL);
private = PRIVATE_DATA (context); private = PRIVATE_DATA (context);
display = GDK_DRAWABLE_DISPLAY (context->source_window); display = GDK_WINDOW_DISPLAY (context->source_window);
context->action = action; context->action = action;
...@@ -3847,7 +3847,7 @@ gdk_drop_reply (GdkDragContext *context, ...@@ -3847,7 +3847,7 @@ gdk_drop_reply (GdkDragContext *context,
if (context->protocol == GDK_DRAG_PROTO_MOTIF) if (context->protocol == GDK_DRAG_PROTO_MOTIF)
{ {
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
...@@ -3898,7 +3898,7 @@ gdk_drop_finish (GdkDragContext *context, ...@@ -3898,7 +3898,7 @@ gdk_drop_finish (GdkDragContext *context,
if (context->protocol == GDK_DRAG_PROTO_XDND) if (context->protocol == GDK_DRAG_PROTO_XDND)
{ {
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (context->source_window); GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
...@@ -4000,7 +4000,7 @@ gdk_drag_get_selection (GdkDragContext *context) ...@@ -4000,7 +4000,7 @@ gdk_drag_get_selection (GdkDragContext *context)
g_return_val_if_fail (context != NULL, GDK_NONE); g_return_val_if_fail (context != NULL, GDK_NONE);
if (context->protocol == GDK_DRAG_PROTO_MOTIF) if (context->protocol == GDK_DRAG_PROTO_MOTIF)
return gdk_x11_xatom_to_atom_for_display (GDK_DRAWABLE_DISPLAY (context->source_window), return gdk_x11_xatom_to_atom_for_display (GDK_WINDOW_DISPLAY (context->source_window),
(PRIVATE_DATA (context))->motif_selection); (PRIVATE_DATA (context))->motif_selection);
else if (context->protocol == GDK_DRAG_PROTO_XDND) else if (context->protocol == GDK_DRAG_PROTO_XDND)
return gdk_atom_intern_static_string ("XdndSelection"); return gdk_atom_intern_static_string ("XdndSelection");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment