Commit b5097de4 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

gdk: gdk_drawable_get_display() => gdk_window_get_display()

parent 2ee8fdb7
...@@ -1060,7 +1060,7 @@ gdk_device_grab (GdkDevice *device, ...@@ -1060,7 +1060,7 @@ gdk_device_grab (GdkDevice *device,
GdkDisplay *display; GdkDisplay *display;
gulong serial; gulong serial;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
serial = _gdk_windowing_window_get_next_serial (display); serial = _gdk_windowing_window_get_next_serial (display);
_gdk_display_add_device_grab (display, _gdk_display_add_device_grab (display,
......
...@@ -1107,7 +1107,7 @@ singlehead_default_window_get_pointer (GdkWindow *window, ...@@ -1107,7 +1107,7 @@ singlehead_default_window_get_pointer (GdkWindow *window,
{ {
GdkDisplay *display; GdkDisplay *display;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
return gdk_window_real_window_get_device_position (display, return gdk_window_real_window_get_device_position (display,
display->core_pointer, display->core_pointer,
......
...@@ -319,7 +319,7 @@ gdk_event_put (const GdkEvent *event) ...@@ -319,7 +319,7 @@ gdk_event_put (const GdkEvent *event)
g_return_if_fail (event != NULL); g_return_if_fail (event != NULL);
if (event->any.window) if (event->any.window)
display = gdk_drawable_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
else else
{ {
GDK_NOTE (MULTIHEAD, GDK_NOTE (MULTIHEAD,
...@@ -1040,9 +1040,9 @@ gdk_event_get_device (const GdkEvent *event) ...@@ -1040,9 +1040,9 @@ gdk_event_get_device (const GdkEvent *event)
"It is most likely synthesized outside Gdk/GTK+\n", "It is most likely synthesized outside Gdk/GTK+\n",
event->type); event->type);
display = gdk_drawable_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
core_pointer = gdk_device_manager_get_client_pointer (device_manager); core_pointer = gdk_display_get_core_pointer (display);
if (event->type == GDK_KEY_PRESS || if (event->type == GDK_KEY_PRESS ||
event->type == GDK_KEY_RELEASE) event->type == GDK_KEY_RELEASE)
...@@ -1090,7 +1090,7 @@ gdk_event_request_motions (const GdkEventMotion *event) ...@@ -1090,7 +1090,7 @@ gdk_event_request_motions (const GdkEventMotion *event)
{ {
gdk_device_get_state (event->device, event->window, NULL, NULL); gdk_device_get_state (event->device, event->window, NULL, NULL);
display = gdk_drawable_get_display (event->window); display = gdk_window_get_display (event->window);
_gdk_display_enable_motion_hints (display, event->device); _gdk_display_enable_motion_hints (display, event->device);
} }
} }
...@@ -1449,7 +1449,7 @@ gdk_synthesize_window_state (GdkWindow *window, ...@@ -1449,7 +1449,7 @@ gdk_synthesize_window_state (GdkWindow *window,
{ {
case GDK_WINDOW_TOPLEVEL: case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP: /* ? */ case GDK_WINDOW_TEMP: /* ? */
gdk_display_put_event (gdk_drawable_get_display (window), &temp_event); gdk_display_put_event (gdk_window_get_display (window), &temp_event);
break; break;
case GDK_WINDOW_FOREIGN: case GDK_WINDOW_FOREIGN:
......
...@@ -498,7 +498,7 @@ gdk_offscreen_window_hide (GdkWindow *window) ...@@ -498,7 +498,7 @@ gdk_offscreen_window_hide (GdkWindow *window)
offscreen = GDK_OFFSCREEN_WINDOW (private->impl); offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
/* May need to break grabs on children */ /* May need to break grabs on children */
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
/* TODO: This needs updating to the new grab world */ /* TODO: This needs updating to the new grab world */
#if 0 #if 0
......
...@@ -509,7 +509,7 @@ gdk_window_finalize (GObject *object) ...@@ -509,7 +509,7 @@ gdk_window_finalize (GObject *object)
GdkWindowObject *obj = (GdkWindowObject *) object; GdkWindowObject *obj = (GdkWindowObject *) object;
GdkDeviceManager *device_manager; GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (gdk_drawable_get_display (GDK_DRAWABLE (window))); device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
g_signal_handlers_disconnect_by_func (device_manager, device_removed_cb, window); g_signal_handlers_disconnect_by_func (device_manager, device_removed_cb, window);
if (!GDK_WINDOW_DESTROYED (window)) if (!GDK_WINDOW_DESTROYED (window))
...@@ -1426,7 +1426,7 @@ gdk_window_new (GdkWindow *parent, ...@@ -1426,7 +1426,7 @@ gdk_window_new (GdkWindow *parent,
private->device_cursor = g_hash_table_new_full (NULL, NULL, NULL, private->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) gdk_cursor_unref); (GDestroyNotify) gdk_cursor_unref);
device_manager = gdk_display_get_device_manager (gdk_drawable_get_display (GDK_DRAWABLE (parent))); device_manager = gdk_display_get_device_manager (gdk_window_get_display (parent));
g_signal_connect (device_manager, "device-removed", g_signal_connect (device_manager, "device-removed",
G_CALLBACK (device_removed_cb), window); G_CALLBACK (device_removed_cb), window);
...@@ -1937,7 +1937,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window, ...@@ -1937,7 +1937,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window)) if (GDK_WINDOW_DESTROYED (window))
return; return;
display = gdk_drawable_get_display (GDK_DRAWABLE (window)); display = gdk_window_get_display (window);
screen = gdk_window_get_screen (window); screen = gdk_window_get_screen (window);
temp_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window); temp_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
if (temp_window == window) if (temp_window == window)
...@@ -4077,7 +4077,7 @@ gdk_window_process_updates_internal (GdkWindow *window) ...@@ -4077,7 +4077,7 @@ gdk_window_process_updates_internal (GdkWindow *window)
if (debug_updates) if (debug_updates)
{ {
/* Make sure we see the red invalid area before redrawing. */ /* Make sure we see the red invalid area before redrawing. */
gdk_display_sync (gdk_drawable_get_display (window)); gdk_display_sync (gdk_window_get_display (window));
g_usleep (70000); g_usleep (70000);
} }
...@@ -5077,7 +5077,7 @@ gdk_window_get_pointer (GdkWindow *window, ...@@ -5077,7 +5077,7 @@ gdk_window_get_pointer (GdkWindow *window,
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL); g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
return gdk_window_get_device_position (window, display->core_pointer, x, y, mask); return gdk_window_get_device_position (window, display->core_pointer, x, y, mask);
} }
...@@ -5115,7 +5115,7 @@ gdk_window_get_device_position (GdkWindow *window, ...@@ -5115,7 +5115,7 @@ gdk_window_get_device_position (GdkWindow *window,
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL); g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
child = display->device_hooks->window_get_device_position (display, device, window, child = display->device_hooks->window_get_device_position (display, device, window,
&tmp_x, &tmp_y, &tmp_mask); &tmp_x, &tmp_y, &tmp_mask);
...@@ -5802,7 +5802,7 @@ gdk_window_hide (GdkWindow *window) ...@@ -5802,7 +5802,7 @@ gdk_window_hide (GdkWindow *window)
GList *devices, *d; GList *devices, *d;
/* May need to break grabs on children */ /* May need to break grabs on children */
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
/* Get all devices */ /* Get all devices */
...@@ -5924,7 +5924,7 @@ gdk_window_set_events (GdkWindow *window, ...@@ -5924,7 +5924,7 @@ gdk_window_set_events (GdkWindow *window,
return; return;
/* If motion hint is disabled, enable motion events again */ /* If motion hint is disabled, enable motion events again */
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if ((private->event_mask & GDK_POINTER_MOTION_HINT_MASK) && if ((private->event_mask & GDK_POINTER_MOTION_HINT_MASK) &&
!(event_mask & GDK_POINTER_MOTION_HINT_MASK)) !(event_mask & GDK_POINTER_MOTION_HINT_MASK))
{ {
...@@ -6004,7 +6004,7 @@ gdk_window_set_device_events (GdkWindow *window, ...@@ -6004,7 +6004,7 @@ gdk_window_set_device_events (GdkWindow *window,
private = (GdkWindowObject *) window; private = (GdkWindowObject *) window;
/* If motion hint is disabled, enable motion events again */ /* If motion hint is disabled, enable motion events again */
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if ((private->event_mask & GDK_POINTER_MOTION_HINT_MASK) && if ((private->event_mask & GDK_POINTER_MOTION_HINT_MASK) &&
!(event_mask & GDK_POINTER_MOTION_HINT_MASK)) !(event_mask & GDK_POINTER_MOTION_HINT_MASK))
_gdk_display_enable_motion_hints (display, device); _gdk_display_enable_motion_hints (display, device);
...@@ -6837,7 +6837,7 @@ gdk_window_set_cursor (GdkWindow *window, ...@@ -6837,7 +6837,7 @@ gdk_window_set_cursor (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
private = (GdkWindowObject *) window; private = (GdkWindowObject *) window;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if (private->cursor) if (private->cursor)
{ {
...@@ -6915,7 +6915,7 @@ gdk_window_set_device_cursor (GdkWindow *window, ...@@ -6915,7 +6915,7 @@ gdk_window_set_device_cursor (GdkWindow *window,
g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (GDK_IS_DEVICE (device));
private = (GdkWindowObject *) window; private = (GdkWindowObject *) window;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if (!cursor) if (!cursor)
g_hash_table_remove (private->device_cursor, device); g_hash_table_remove (private->device_cursor, device);
...@@ -7628,7 +7628,7 @@ gdk_window_set_composited (GdkWindow *window, ...@@ -7628,7 +7628,7 @@ gdk_window_set_composited (GdkWindow *window,
if (composited) if (composited)
gdk_window_ensure_native (window); gdk_window_ensure_native (window);
display = gdk_drawable_get_display (GDK_DRAWABLE (window)); display = gdk_window_get_display (window);
if (!gdk_display_supports_composite (display) && composited) if (!gdk_display_supports_composite (display) && composited)
{ {
...@@ -7884,7 +7884,7 @@ _gdk_window_add_damage (GdkWindow *toplevel, ...@@ -7884,7 +7884,7 @@ _gdk_window_add_damage (GdkWindow *toplevel,
event.expose.send_event = FALSE; event.expose.send_event = FALSE;
event.expose.region = damaged_region; event.expose.region = damaged_region;
cairo_region_get_extents (event.expose.region, &event.expose.area); cairo_region_get_extents (event.expose.region, &event.expose.area);
display = gdk_drawable_get_display (event.expose.window); display = gdk_window_get_display (event.expose.window);
_gdk_event_queue_append (display, gdk_event_copy (&event)); _gdk_event_queue_append (display, gdk_event_copy (&event));
} }
...@@ -8204,7 +8204,7 @@ gdk_window_beep (GdkWindow *window) ...@@ -8204,7 +8204,7 @@ gdk_window_beep (GdkWindow *window)
return; return;
toplevel = get_event_toplevel (window); toplevel = get_event_toplevel (window);
display = gdk_drawable_get_display (GDK_DRAWABLE (window)); display = gdk_window_get_display (window);
if (toplevel && !gdk_window_is_offscreen ((GdkWindowObject *)toplevel)) if (toplevel && !gdk_window_is_offscreen ((GdkWindowObject *)toplevel))
_gdk_windowing_window_beep (toplevel); _gdk_windowing_window_beep (toplevel);
...@@ -8478,12 +8478,12 @@ _gdk_make_event (GdkWindow *window, ...@@ -8478,12 +8478,12 @@ _gdk_make_event (GdkWindow *window,
if (event_in_queue) if (event_in_queue)
{ {
if (before_event) if (before_event)
_gdk_event_queue_insert_before (gdk_drawable_get_display (window), event_in_queue, event); _gdk_event_queue_insert_before (gdk_window_get_display (window), event_in_queue, event);
else else
_gdk_event_queue_insert_after (gdk_drawable_get_display (window), event_in_queue, event); _gdk_event_queue_insert_after (gdk_window_get_display (window), event_in_queue, event);
} }
else else
_gdk_event_queue_append (gdk_drawable_get_display (window), event); _gdk_event_queue_append (gdk_window_get_display (window), event);
return event; return event;
} }
...@@ -8899,7 +8899,7 @@ gdk_pointer_grab (GdkWindow * window, ...@@ -8899,7 +8899,7 @@ gdk_pointer_grab (GdkWindow * window,
native = gdk_window_get_toplevel (native); native = gdk_window_get_toplevel (native);
} }
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
serial = _gdk_windowing_window_get_next_serial (display); serial = _gdk_windowing_window_get_next_serial (display);
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
...@@ -9004,7 +9004,7 @@ gdk_keyboard_grab (GdkWindow *window, ...@@ -9004,7 +9004,7 @@ gdk_keyboard_grab (GdkWindow *window,
native = gdk_window_get_toplevel (native); native = gdk_window_get_toplevel (native);
} }
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
serial = _gdk_windowing_window_get_next_serial (display); serial = _gdk_windowing_window_get_next_serial (display);
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
...@@ -9081,7 +9081,7 @@ do_synthesize_crossing_event (gpointer data) ...@@ -9081,7 +9081,7 @@ do_synthesize_crossing_event (gpointer data)
if (GDK_WINDOW_DESTROYED (changed_toplevel)) if (GDK_WINDOW_DESTROYED (changed_toplevel))
return FALSE; return FALSE;
display = gdk_drawable_get_display (changed_toplevel); display = gdk_window_get_display (changed_toplevel);
serial = _gdk_windowing_window_get_next_serial (display); serial = _gdk_windowing_window_get_next_serial (display);
g_hash_table_iter_init (&iter, display->pointers_info); g_hash_table_iter_init (&iter, display->pointers_info);
...@@ -9131,7 +9131,7 @@ _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window) ...@@ -9131,7 +9131,7 @@ _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window)
if (_gdk_native_windows) if (_gdk_native_windows)
return; /* We use the native crossing events if all native */ return; /* We use the native crossing events if all native */
display = gdk_drawable_get_display (changed_window); display = gdk_window_get_display (changed_window);
toplevel = get_event_toplevel (changed_window); toplevel = get_event_toplevel (changed_window);
toplevel_priv = (GdkWindowObject *) toplevel; toplevel_priv = (GdkWindowObject *) toplevel;
...@@ -9442,7 +9442,7 @@ proxy_button_event (GdkEvent *source_event, ...@@ -9442,7 +9442,7 @@ proxy_button_event (GdkEvent *source_event,
gdk_event_get_state (source_event, &state); gdk_event_get_state (source_event, &state);
time_ = gdk_event_get_time (source_event); time_ = gdk_event_get_time (source_event);
device = gdk_event_get_device (source_event); device = gdk_event_get_device (source_event);
display = gdk_drawable_get_display (source_event->any.window); display = gdk_window_get_display (source_event->any.window);
toplevel_window = convert_native_coords_to_toplevel (event_window, toplevel_window = convert_native_coords_to_toplevel (event_window,
toplevel_x, toplevel_y, toplevel_x, toplevel_y,
&toplevel_x, &toplevel_y); &toplevel_x, &toplevel_y);
...@@ -9900,7 +9900,7 @@ _gdk_window_get_input_window_for_event (GdkWindow *native_window, ...@@ -9900,7 +9900,7 @@ _gdk_window_get_input_window_for_event (GdkWindow *native_window,
toplevel_x = x; toplevel_x = x;
toplevel_y = y; toplevel_y = y;
display = gdk_drawable_get_display (native_window); display = gdk_window_get_display (native_window);
toplevel_window = convert_native_coords_to_toplevel (native_window, toplevel_window = convert_native_coords_to_toplevel (native_window,
toplevel_x, toplevel_y, toplevel_x, toplevel_y,
&toplevel_x, &toplevel_y); &toplevel_x, &toplevel_y);
......
...@@ -268,7 +268,7 @@ gdk_device_core_query_state (GdkDevice *device, ...@@ -268,7 +268,7 @@ gdk_device_core_query_state (GdkDevice *device,
if (!found_window) if (!found_window)
return FALSE; return FALSE;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if (root_window) if (root_window)
*root_window = _gdk_root; *root_window = _gdk_root;
......
...@@ -366,7 +366,7 @@ generate_motion_event (GdkWindow *window) ...@@ -366,7 +366,7 @@ generate_motion_event (GdkWindow *window)
nswindow = ((GdkWindowImplQuartz *)private->impl)->toplevel; nswindow = ((GdkWindowImplQuartz *)private->impl)->toplevel;
view = (GdkQuartzView *)[nswindow contentView]; view = (GdkQuartzView *)[nswindow contentView];
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
screen_point = [NSEvent mouseLocation]; screen_point = [NSEvent mouseLocation];
...@@ -540,7 +540,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent) ...@@ -540,7 +540,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
view = (GdkQuartzView *)[[nsevent window] contentView]; view = (GdkQuartzView *)[[nsevent window] contentView];
window = [view gdkWindow]; window = [view gdkWindow];
display = gdk_drawable_get_display (GDK_DRAWABLE (window)); display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager, list = gdk_device_manager_list_devices (device_manager,
...@@ -583,7 +583,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent, ...@@ -583,7 +583,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
view = (GdkQuartzView *)[[nsevent window] contentView]; view = (GdkQuartzView *)[[nsevent window] contentView];
toplevel = [view gdkWindow]; toplevel = [view gdkWindow];
display = gdk_drawable_get_display (toplevel); display = gdk_window_get_display (toplevel);
private = GDK_WINDOW_OBJECT (toplevel); private = GDK_WINDOW_OBJECT (toplevel);
event_type = [nsevent type]; event_type = [nsevent type];
......
...@@ -145,7 +145,7 @@ static void ...@@ -145,7 +145,7 @@ static void
check_grab_unmap (GdkWindow *window) check_grab_unmap (GdkWindow *window)
{ {
GList *list, *l; GList *list, *l;
GdkDisplay *display = gdk_drawable_get_display (window); GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager; GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
...@@ -163,7 +163,7 @@ static void ...@@ -163,7 +163,7 @@ static void
check_grab_destroy (GdkWindow *window) check_grab_destroy (GdkWindow *window)
{ {
GList *list, *l; GList *list, *l;
GdkDisplay *display = gdk_drawable_get_display (window); GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager; GdkDeviceManager *device_manager;
/* Make sure there is no lasting grab in this native window */ /* Make sure there is no lasting grab in this native window */
......
...@@ -888,7 +888,7 @@ _gdk_input_other_event (GdkEvent *event, ...@@ -888,7 +888,7 @@ _gdk_input_other_event (GdkEvent *event,
window = _gdk_root; window = _gdk_root;
g_object_ref (window); g_object_ref (window);
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
GDK_NOTE (EVENTS_OR_INPUT, GDK_NOTE (EVENTS_OR_INPUT,
g_print ("_gdk_input_other_event: window=%p %+d%+d\n", g_print ("_gdk_input_other_event: window=%p %+d%+d\n",
......
...@@ -248,7 +248,7 @@ gdk_device_core_query_state (GdkDevice *device, ...@@ -248,7 +248,7 @@ gdk_device_core_query_state (GdkDevice *device,
int xroot_x, xroot_y, xwin_x, xwin_y; int xroot_x, xroot_y, xwin_x, xwin_y;
unsigned int xmask; unsigned int xmask;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if (!XQueryPointer (GDK_WINDOW_XDISPLAY (window), if (!XQueryPointer (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), GDK_WINDOW_XID (window),
......
...@@ -307,7 +307,7 @@ gdk_device_xi2_query_state (GdkDevice *device, ...@@ -307,7 +307,7 @@ gdk_device_xi2_query_state (GdkDevice *device,
return FALSE; return FALSE;
priv = GDK_DEVICE_XI2 (device)->priv; priv = GDK_DEVICE_XI2 (device)->priv;
display = gdk_drawable_get_display (window); display = gdk_window_get_display (window);
if (!XIQueryPointer (GDK_WINDOW_XDISPLAY (window), if (!XIQueryPointer (GDK_WINDOW_XDISPLAY (window),
priv->device_id, priv->device_id,
......
...@@ -453,7 +453,7 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator, ...@@ -453,7 +453,7 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
event->button.button = xdbe->button; event->button.button = xdbe->button;
if (event->button.type == GDK_BUTTON_PRESS) if (event->button.type == GDK_BUTTON_PRESS)
_gdk_event_button_generate (gdk_drawable_get_display (event->button.window), _gdk_event_button_generate (gdk_window_get_display (event->button.window),
event); event);
GDK_NOTE (EVENTS, GDK_NOTE (EVENTS,
......
...@@ -286,8 +286,8 @@ gdk_drag_context_find (GdkDisplay *display, ...@@ -286,8 +286,8 @@ gdk_drag_context_find (GdkDisplay *display,
context = (GdkDragContext *)tmp_list->data; context = (GdkDragContext *)tmp_list->data;
private = PRIVATE_DATA (context); private = PRIVATE_DATA (context);
if ((context->source_window && gdk_drawable_get_display (context->source_window) != display) || if ((context->source_window && gdk_window_get_display (context->source_window) != display) ||
(context->dest_window && gdk_drawable_get_display (context->dest_window) != display)) (context->dest_window && gdk_window_get_display (context->dest_window) != display))
continue; continue;
context_dest_xid = context->dest_window ? context_dest_xid = context->dest_window ?
...@@ -1919,7 +1919,7 @@ motif_drag_status (GdkEvent *event, ...@@ -1919,7 +1919,7 @@ motif_drag_status (GdkEvent *event,
GDK_NOTE (DND, GDK_NOTE (DND,
g_message ("Motif status message: flags %x", flags)); g_message ("Motif status message: flags %x", flags));
display = gdk_drawable_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
if (!display) if (!display)
return GDK_FILTER_REMOVE; return GDK_FILTER_REMOVE;
...@@ -2137,7 +2137,7 @@ xdnd_status_filter (GdkXEvent *xev, ...@@ -2137,7 +2137,7 @@ xdnd_status_filter (GdkXEvent *xev,
g_message ("XdndStatus: dest_window: %#x action: %ld", g_message ("XdndStatus: dest_window: %#x action: %ld",
dest_window, action)); dest_window, action));
display = gdk_drawable_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window); context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window);
if (context) if (context)
...@@ -2186,7 +2186,7 @@ xdnd_finished_filter (GdkXEvent *xev, ...@@ -2186,7 +2186,7 @@ xdnd_finished_filter (GdkXEvent *xev,
GDK_NOTE (DND, GDK_NOTE (DND,
g_message ("XdndFinished: dest_window: %#x", dest_window)); g_message ("XdndFinished: dest_window: %#x", dest_window));
display = gdk_drawable_get_display (event->any.window); display = gdk_window_get_display (event->any.window);
context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window); context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window);
if (context) if (context)
...@@ -3185,7 +3185,7 @@ gdk_drag_begin (GdkWindow *window, ...@@ -3185,7 +3185,7 @@ gdk_drag_begin (GdkWindow *window,
new_context->actions = 0; new_context->actions = 0;
display = gdk_drawable_get_display (GDK_DRAWABLE (window)); display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (display); device_manager = gdk_display_get_device_manager (display);
device = gdk_device_manager_get_client_pointer (device_manager); device = gdk_device_manager_get_client_pointer (device_manager);
gdk_drag_context_set_device (new_context, device); gdk_drag_context_set_device (new_context, device);
...@@ -3942,7 +3942,7 @@ gdk_window_register_dnd (GdkWindow *window) ...@@ -3942,7 +3942,7 @@ gdk_window_register_dnd (GdkWindow *window)
static const gulong xdnd_version = 5; static const gulong xdnd_version = 5;
MotifDragReceiverInfo info; MotifDragReceiverInfo info;
Atom motif_drag_receiver_info_atom; Atom motif_drag_receiver_info_atom;
GdkDisplay *display = gdk_drawable_get_display (window); GdkDisplay *display = gdk_window_get_display (window);
g_return_if_fail (window != NULL); g_return_if_fail (window != NULL);
......