[gtk+/rendering-cleanup: 131/142] gdk: gdk_drawable_get_display() => gdk_window_get_display()



commit 72a0c6dcae15892da9096eda76d89e0ca146c562
Author: Benjamin Otte <otte redhat com>
Date:   Sun Aug 29 02:08:47 2010 +0200

    gdk: gdk_drawable_get_display() => gdk_window_get_display()

 gdk/gdkdevice.c                    |    2 +-
 gdk/gdkdisplay.c                   |    2 +-
 gdk/gdkevents.c                    |    8 +++---
 gdk/gdkoffscreenwindow.c           |    2 +-
 gdk/gdkwindow.c                    |   46 ++++++++++++++++++------------------
 gdk/quartz/gdkdevice-core.c        |    2 +-
 gdk/quartz/gdkevents-quartz.c      |    6 ++--
 gdk/quartz/gdkwindow-quartz.c      |    4 +-
 gdk/win32/gdkdevicemanager-win32.c |    2 +-
 gdk/x11/gdkdevice-core.c           |    2 +-
 gdk/x11/gdkdevice-xi2.c            |    2 +-
 gdk/x11/gdkdevicemanager-xi.c      |    2 +-
 gdk/x11/gdkdnd-x11.c               |   16 ++++++------
 gdk/x11/gdkdrawable-x11.c          |    2 +-
 gdk/x11/gdkmain-x11.c              |    4 +-
 gdk/x11/gdkproperty-x11.c          |    4 +-
 gdk/x11/gdkselection-x11.c         |    2 +-
 gdk/x11/gdktestutils-x11.c         |    2 +-
 gdk/x11/gdkwindow-x11.c            |   38 +++++++++++++++---------------
 19 files changed, 74 insertions(+), 74 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index a6a4d24..cec3a08 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -1059,7 +1059,7 @@ gdk_device_grab (GdkDevice        *device,
       GdkDisplay *display;
       gulong serial;
 
-      display = gdk_drawable_get_display (window);
+      display = gdk_window_get_display (window);
       serial = _gdk_windowing_window_get_next_serial (display);
 
       _gdk_display_add_device_grab (display,
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index dc1c5c8..f3a3b77 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1101,7 +1101,7 @@ singlehead_default_window_get_pointer (GdkWindow       *window,
 {
   GdkDisplay *display;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   return gdk_window_real_window_get_device_position (display,
                                                      display->core_pointer,
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index e10106b..a0ed64d 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -319,7 +319,7 @@ gdk_event_put (const GdkEvent *event)
   g_return_if_fail (event != NULL);
 
   if (event->any.window)
-    display = gdk_drawable_get_display (event->any.window);
+    display = gdk_window_get_display (event->any.window);
   else
     {
       GDK_NOTE (MULTIHEAD,
@@ -1038,7 +1038,7 @@ gdk_event_get_device (const GdkEvent *event)
                    "It is most likely synthesized outside Gdk/GTK+\n",
                    event->type);
 
-        display = gdk_drawable_get_display (event->any.window);
+        display = gdk_window_get_display (event->any.window);
         core_pointer = gdk_display_get_core_pointer (display);
 
         if (event->type == GDK_KEY_PRESS ||
@@ -1087,7 +1087,7 @@ gdk_event_request_motions (const GdkEventMotion *event)
     {
       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);
     }
 }
@@ -1446,7 +1446,7 @@ gdk_synthesize_window_state (GdkWindow     *window,
     {
     case GDK_WINDOW_TOPLEVEL:
     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;
       
     case GDK_WINDOW_FOREIGN:
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 13c78e7..78b92d5 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -498,7 +498,7 @@ gdk_offscreen_window_hide (GdkWindow *window)
   offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
 
   /* 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 */
 #if 0
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 5e6c927..fd6e985 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -509,7 +509,7 @@ gdk_window_finalize (GObject *object)
   GdkWindowObject *obj = (GdkWindowObject *) object;
   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);
 
   if (!GDK_WINDOW_DESTROYED (window))
@@ -1426,7 +1426,7 @@ gdk_window_new (GdkWindow     *parent,
   private->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
                                                   (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_CALLBACK (device_removed_cb), window);
 
@@ -1937,7 +1937,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
   if (GDK_WINDOW_DESTROYED (window))
     return;
 
-  display = gdk_drawable_get_display (GDK_DRAWABLE (window));
+  display = gdk_window_get_display (window);
   screen = gdk_window_get_screen (window);
   temp_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
   if (temp_window == window)
@@ -4074,7 +4074,7 @@ gdk_window_process_updates_internal (GdkWindow *window)
 	  if (debug_updates)
 	    {
 	      /* 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);
 	    }
 
@@ -5074,7 +5074,7 @@ gdk_window_get_pointer (GdkWindow	  *window,
 
   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);
 }
@@ -5112,7 +5112,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_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,
                                                              &tmp_x, &tmp_y, &tmp_mask);
 
@@ -5799,7 +5799,7 @@ gdk_window_hide (GdkWindow *window)
       GList *devices, *d;
 
       /* 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);
 
       /* Get all devices */
@@ -5921,7 +5921,7 @@ gdk_window_set_events (GdkWindow       *window,
     return;
 
   /* 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) &&
       !(event_mask & GDK_POINTER_MOTION_HINT_MASK))
     {
@@ -6001,7 +6001,7 @@ gdk_window_set_device_events (GdkWindow    *window,
   private = (GdkWindowObject *) window;
 
   /* 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) &&
       !(event_mask & GDK_POINTER_MOTION_HINT_MASK))
     _gdk_display_enable_motion_hints (display, device);
@@ -6834,7 +6834,7 @@ gdk_window_set_cursor (GdkWindow *window,
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   private = (GdkWindowObject *) window;
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (private->cursor)
     {
@@ -6912,7 +6912,7 @@ gdk_window_set_device_cursor (GdkWindow *window,
   g_return_if_fail (GDK_IS_DEVICE (device));
 
   private = (GdkWindowObject *) window;
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (!cursor)
     g_hash_table_remove (private->device_cursor, device);
@@ -7625,7 +7625,7 @@ gdk_window_set_composited (GdkWindow *window,
   if (composited)
     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)
     {
@@ -7881,7 +7881,7 @@ _gdk_window_add_damage (GdkWindow *toplevel,
   event.expose.send_event = FALSE;
   event.expose.region = damaged_region;
   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));
 }
 
@@ -8201,7 +8201,7 @@ gdk_window_beep (GdkWindow *window)
     return;
 
   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))
     _gdk_windowing_window_beep (toplevel);
@@ -8475,12 +8475,12 @@ _gdk_make_event (GdkWindow    *window,
   if (event_in_queue)
     {
     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
-      _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
-    _gdk_event_queue_append (gdk_drawable_get_display (window), event);
+    _gdk_event_queue_append (gdk_window_get_display (window), event);
 
   return event;
 }
@@ -8896,7 +8896,7 @@ gdk_pointer_grab (GdkWindow *	  window,
       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);
   device_manager = gdk_display_get_device_manager (display);
@@ -9001,7 +9001,7 @@ gdk_keyboard_grab (GdkWindow *window,
       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);
   device_manager = gdk_display_get_device_manager (display);
@@ -9078,7 +9078,7 @@ do_synthesize_crossing_event (gpointer data)
   if (GDK_WINDOW_DESTROYED (changed_toplevel))
     return FALSE;
 
-  display = gdk_drawable_get_display (changed_toplevel);
+  display = gdk_window_get_display (changed_toplevel);
   serial = _gdk_windowing_window_get_next_serial (display);
   g_hash_table_iter_init (&iter, display->pointers_info);
 
@@ -9128,7 +9128,7 @@ _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window)
   if (_gdk_native_windows)
     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_priv = (GdkWindowObject *) toplevel;
@@ -9439,7 +9439,7 @@ proxy_button_event (GdkEvent *source_event,
   gdk_event_get_state (source_event, &state);
   time_ = gdk_event_get_time (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_x, toplevel_y,
 						       &toplevel_x, &toplevel_y);
@@ -9897,7 +9897,7 @@ _gdk_window_get_input_window_for_event (GdkWindow *native_window,
   toplevel_x = x;
   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_x, toplevel_y,
 						       &toplevel_x, &toplevel_y);
diff --git a/gdk/quartz/gdkdevice-core.c b/gdk/quartz/gdkdevice-core.c
index 33e6a40..6397cf4 100644
--- a/gdk/quartz/gdkdevice-core.c
+++ b/gdk/quartz/gdkdevice-core.c
@@ -268,7 +268,7 @@ gdk_device_core_query_state (GdkDevice        *device,
   if (!found_window)
     return FALSE;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (root_window)
     *root_window = _gdk_root;
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 28807b8..2f8b0c8 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -366,7 +366,7 @@ generate_motion_event (GdkWindow *window)
   nswindow = ((GdkWindowImplQuartz *)private->impl)->toplevel;
   view = (GdkQuartzView *)[nswindow contentView];
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   screen_point = [NSEvent mouseLocation];
 
@@ -540,7 +540,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
   view = (GdkQuartzView *)[[nsevent window] contentView];
   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);
   list = gdk_device_manager_list_devices (device_manager,
@@ -583,7 +583,7 @@ find_toplevel_for_mouse_event (NSEvent    *nsevent,
   view = (GdkQuartzView *)[[nsevent window] contentView];
   toplevel = [view gdkWindow];
 
-  display = gdk_drawable_get_display (toplevel);
+  display = gdk_window_get_display (toplevel);
   private = GDK_WINDOW_OBJECT (toplevel);
 
   event_type = [nsevent type];
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 538753b..67de51a 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -145,7 +145,7 @@ static void
 check_grab_unmap (GdkWindow *window)
 {
   GList *list, *l;
-  GdkDisplay *display = gdk_drawable_get_display (window);
+  GdkDisplay *display = gdk_window_get_display (window);
   GdkDeviceManager *device_manager;
 
   device_manager = gdk_display_get_device_manager (display);
@@ -163,7 +163,7 @@ static void
 check_grab_destroy (GdkWindow *window)
 {
   GList *list, *l;
-  GdkDisplay *display = gdk_drawable_get_display (window);
+  GdkDisplay *display = gdk_window_get_display (window);
   GdkDeviceManager *device_manager;
 
   /* Make sure there is no lasting grab in this native window */
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index f0fddb1..6a7b6e7 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -888,7 +888,7 @@ _gdk_input_other_event (GdkEvent  *event,
     window = _gdk_root;
 
   g_object_ref (window);
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   GDK_NOTE (EVENTS_OR_INPUT,
 	    g_print ("_gdk_input_other_event: window=%p %+d%+d\n",
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index 7ff8c4d..a947fec 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -248,7 +248,7 @@ gdk_device_core_query_state (GdkDevice        *device,
   int xroot_x, xroot_y, xwin_x, xwin_y;
   unsigned int xmask;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (!XQueryPointer (GDK_WINDOW_XDISPLAY (window),
                       GDK_WINDOW_XID (window),
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index d7bc64e..f64896c 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -307,7 +307,7 @@ gdk_device_xi2_query_state (GdkDevice        *device,
     return FALSE;
 
   priv = GDK_DEVICE_XI2 (device)->priv;
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (!XIQueryPointer (GDK_WINDOW_XDISPLAY (window),
                        priv->device_id,
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index e11cb58..6c88b58 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -448,7 +448,7 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
       event->button.button = xdbe->button;
 
       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);
 
       GDK_NOTE (EVENTS,
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 03a3ef9..f46ea76 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -286,8 +286,8 @@ gdk_drag_context_find (GdkDisplay *display,
       context = (GdkDragContext *)tmp_list->data;
       private = PRIVATE_DATA (context);
 
-      if ((context->source_window && gdk_drawable_get_display (context->source_window) != display) ||
-	  (context->dest_window && gdk_drawable_get_display (context->dest_window) != display))
+      if ((context->source_window && gdk_window_get_display (context->source_window) != display) ||
+	  (context->dest_window && gdk_window_get_display (context->dest_window) != display))
 	continue;
 
       context_dest_xid = context->dest_window ? 
@@ -1918,7 +1918,7 @@ motif_drag_status (GdkEvent *event,
   GDK_NOTE (DND, 
 	    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)
     return GDK_FILTER_REMOVE;
   
@@ -2136,7 +2136,7 @@ xdnd_status_filter (GdkXEvent *xev,
 	    g_message ("XdndStatus: dest_window: %#x  action: %ld",
 		       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);
   
   if (context)
@@ -2185,7 +2185,7 @@ xdnd_finished_filter (GdkXEvent *xev,
   GDK_NOTE (DND, 
 	    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);
   
   if (context)
@@ -2765,7 +2765,7 @@ xdnd_manage_source_filter (GdkDragContext *context,
 	   */
 	}
       
-      gdk_display_sync (gdk_drawable_get_display (window));
+      gdk_display_sync (gdk_window_get_display (window));
       gdk_error_trap_pop ();  
     }
 }
@@ -3181,7 +3181,7 @@ gdk_drag_begin (GdkWindow     *window,
   
   new_context->actions = 0;
 
-  display = gdk_drawable_get_display (GDK_DRAWABLE (window));
+  display = gdk_window_get_display (window);
   device = gdk_display_get_core_pointer (display);
   gdk_drag_context_set_device (new_context, device);
 
@@ -3937,7 +3937,7 @@ gdk_window_register_dnd (GdkWindow      *window)
   static const gulong xdnd_version = 5;
   MotifDragReceiverInfo info;
   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);
 
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index b1634f8..fda1299 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -175,7 +175,7 @@ gdk_x11_drawable_get_xid (GdkDrawable *drawable)
 	   * this function returns. This is required because the returned XID
 	   * for this window must be valid immediately, even with another
 	   * connection to the Xserver */
-	  gdk_display_sync (gdk_drawable_get_display (window));
+	  gdk_display_sync (gdk_window_get_display (window));
 	}
       
       if (!GDK_WINDOW_IS_X11 (window))
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index cb9ff04..3655211 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -188,7 +188,7 @@ void
 _gdk_xgrab_check_unmap (GdkWindow *window,
 			gulong     serial)
 {
-  GdkDisplay *display = gdk_drawable_get_display (window);
+  GdkDisplay *display = gdk_window_get_display (window);
   GdkDeviceManager *device_manager;
   GList *devices, *d;
 
@@ -216,7 +216,7 @@ _gdk_xgrab_check_unmap (GdkWindow *window,
 void
 _gdk_xgrab_check_destroy (GdkWindow *window)
 {
-  GdkDisplay *display = gdk_drawable_get_display (window);
+  GdkDisplay *display = gdk_window_get_display (window);
   GdkDeviceManager *device_manager;
   GdkDeviceGrabInfo *grab;
   GList *devices, *d;
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 5e8bbe4..55e114f 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -563,7 +563,7 @@ gdk_property_get (GdkWindow   *window,
   if (GDK_WINDOW_DESTROYED (window))
     return FALSE;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   xproperty = gdk_x11_atom_to_xatom_for_display (display, property);
   if (type == GDK_NONE)
     xtype = AnyPropertyType;
@@ -703,7 +703,7 @@ gdk_property_change (GdkWindow    *window,
 
   gdk_window_ensure_native (window);
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   xproperty = gdk_x11_atom_to_xatom_for_display (display, property);
   xtype = gdk_x11_atom_to_xatom_for_display (display, type);
   xwindow = GDK_WINDOW_XID (window);
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 7a8d914..c9b71ab 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -83,7 +83,7 @@ _gdk_selection_filter_clear_event (XSelectionClearEvent *event)
     {
       OwnerInfo *info = tmp_list->data;
 
-      if (gdk_drawable_get_display (info->owner) == display &&
+      if (gdk_window_get_display (info->owner) == display &&
 	  info->selection == gdk_x11_xatom_to_atom_for_display (display, event->selection))
 	{
 	  if ((GDK_DRAWABLE_XID (info->owner) == event->window &&
diff --git a/gdk/x11/gdktestutils-x11.c b/gdk/x11/gdktestutils-x11.c
index 06e1c36..a66df58 100644
--- a/gdk/x11/gdktestutils-x11.c
+++ b/gdk/x11/gdktestutils-x11.c
@@ -127,7 +127,7 @@ gdk_test_simulate_key (GdkWindow      *window,
   xev.y_root = 0;
   xev.state = modifiers;
   xev.keycode = 0;
-  success = gdk_keymap_get_entries_for_keyval (gdk_keymap_get_for_display (gdk_drawable_get_display (window)), keyval, &keys, &n_keys);
+  success = gdk_keymap_get_entries_for_keyval (gdk_keymap_get_for_display (gdk_window_get_display (window)), keyval, &keys, &n_keys);
   success &= n_keys > 0;
   if (success)
     {
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 8ee0b29..b4ab5af 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -504,7 +504,7 @@ _gdk_windowing_window_init (GdkScreen * screen)
 static void
 set_wm_protocols (GdkWindow *window)
 {
-  GdkDisplay *display = gdk_drawable_get_display (window);
+  GdkDisplay *display = gdk_window_get_display (window);
   Atom protocols[4];
   int n = 0;
   
@@ -623,7 +623,7 @@ setup_toplevel_window (GdkWindow *window,
 {
   GdkWindowObject *obj = (GdkWindowObject *)window;
   GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (window);
-  GdkDisplay *display = gdk_drawable_get_display (window);
+  GdkDisplay *display = gdk_window_get_display (window);
   Display *xdisplay = GDK_WINDOW_XDISPLAY (window);
   XID xid = GDK_WINDOW_XID (window);
   GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (parent));
@@ -1355,7 +1355,7 @@ gdk_window_x11_show (GdkWindow *window, gboolean already_mapped)
       
   if (WINDOW_IS_TOPLEVEL (window))
     {
-      display = gdk_drawable_get_display (window);
+      display = gdk_window_get_display (window);
       display_x11 = GDK_DISPLAY_X11 (display);
       toplevel = _gdk_x11_window_get_toplevel (window);
       
@@ -1789,7 +1789,7 @@ move_to_current_desktop (GdkWindow *window)
       gulong *current_desktop;
       GdkDisplay *display;
       
-      display = gdk_drawable_get_display (window);
+      display = gdk_window_get_display (window);
 
       /* Get current desktop, then set it; this is a race, but not
        * one that matters much in practice.
@@ -1911,7 +1911,7 @@ gdk_window_set_type_hint (GdkWindow        *window,
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
     return;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   switch (hint)
     {
@@ -1997,7 +1997,7 @@ gdk_window_get_type_hint (GdkWindow *window)
 
   type = GDK_WINDOW_TYPE_HINT_NORMAL;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
                           gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_WINDOW_TYPE"),
@@ -2513,7 +2513,7 @@ gdk_window_set_title (GdkWindow   *window,
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
     return;
   
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   xdisplay = GDK_DISPLAY_XDISPLAY (display);
   xwindow = GDK_WINDOW_XID (window);
 
@@ -2557,7 +2557,7 @@ gdk_window_set_role (GdkWindow   *window,
 {
   GdkDisplay *display;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (GDK_WINDOW_DESTROYED (window) ||
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
@@ -2591,7 +2591,7 @@ gdk_window_set_startup_id (GdkWindow   *window,
 
   g_return_if_fail (GDK_IS_WINDOW (window));
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (GDK_WINDOW_DESTROYED (window) ||
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
@@ -2904,7 +2904,7 @@ gdk_window_get_frame_extents (GdkWindow    *window,
 
   gdk_error_trap_push();
   
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   xwindow = GDK_WINDOW_XID (window);
 
   /* first try: use _NET_FRAME_EXTENTS */
@@ -3107,7 +3107,7 @@ gdk_window_x11_get_device_state (GdkWindow       *window,
           int winy = 0;
           unsigned int xmask = 0;
 
-          _gdk_windowing_get_device_state (gdk_drawable_get_display (window), device,
+          _gdk_windowing_get_device_state (gdk_window_get_display (window), device,
                                            &screen, &rootx, &rooty, &xmask);
 	  gdk_window_get_origin (window, &originx, &originy);
 	  winx = rootx - originx;
@@ -3343,7 +3343,7 @@ gdk_window_x11_set_events (GdkWindow    *window,
       if (GDK_WINDOW_XID (window) != GDK_WINDOW_XROOTWIN (window))
         xevent_mask = StructureNotifyMask | PropertyChangeMask;
 
-      display_x11 = GDK_DISPLAY_X11 (gdk_drawable_get_display (window));
+      display_x11 = GDK_DISPLAY_X11 (gdk_window_get_display (window));
       gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
                                       GDK_WINDOW_XWINDOW (window), event_mask,
                                       xevent_mask);
@@ -3628,7 +3628,7 @@ gdk_x11_window_set_user_time (GdkWindow *window,
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
     return;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   display_x11 = GDK_DISPLAY_X11 (display);
   toplevel = _gdk_x11_window_get_toplevel (window);
 
@@ -3799,7 +3799,7 @@ gdk_window_set_icon_list (GdkWindow *window,
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
     return;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   
   l = pixbufs;
   size = 0;
@@ -3919,7 +3919,7 @@ gdk_window_set_icon_name (GdkWindow   *window,
       !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
     return;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"),
                       GUINT_TO_POINTER (name != NULL));
@@ -4392,7 +4392,7 @@ gdk_window_set_group (GdkWindow *window,
   toplevel = _gdk_x11_window_get_toplevel (window);
 
   if (leader == NULL)
-    leader = gdk_display_get_default_group (gdk_drawable_get_display (window));
+    leader = gdk_display_get_default_group (gdk_window_get_display (window));
   
   if (toplevel->group_leader != leader)
     {
@@ -4419,7 +4419,7 @@ gdk_window_get_mwm_hints (GdkWindow *window)
   if (GDK_WINDOW_DESTROYED (window))
     return NULL;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   
   hints_atom = gdk_x11_get_xatom_by_name_for_display (display, _XA_MOTIF_WM_HINTS);
 
@@ -4450,7 +4450,7 @@ gdk_window_set_mwm_hints (GdkWindow *window,
   if (GDK_WINDOW_DESTROYED (window))
     return;
   
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
   
   hints_atom = gdk_x11_get_xatom_by_name_for_display (display, _XA_MOTIF_WM_HINTS);
 
@@ -5487,7 +5487,7 @@ gdk_window_set_opacity (GdkWindow *window,
       !WINDOW_IS_TOPLEVEL (window))
     return;
 
-  display = gdk_drawable_get_display (window);
+  display = gdk_window_get_display (window);
 
   if (opacity < 0)
     opacity = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]