[libwnck] core: Remove usage of _wnck_get_default_display()...



commit 6b42ab2f6ad241e0f887853c2d588015c6f66020
Author: Vincent Untz <vuntz gnome org>
Date:   Thu Jan 20 00:05:09 2011 +0100

    core: Remove usage of _wnck_get_default_display()...
    
    ... in wnck_screen_construct().

 libwnck/screen.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libwnck/screen.c b/libwnck/screen.c
index d9b7767..53c9a5d 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -578,13 +578,10 @@ sn_error_trap_pop (SnDisplay *display,
 #endif /* HAVE_STARTUP_NOTIFICATION */
 
 static void
-wnck_screen_construct (WnckScreen *screen,
+wnck_screen_construct (Display    *display,
+                       WnckScreen *screen,
                        int         number)
 {
-  Display *display;
-
-  display = _wnck_get_default_display ();
-
   /* Create the initial state of the screen. */
   screen->priv->xroot = RootWindow (display, number);
   screen->priv->xscreen = ScreenOfDisplay (display, number);
@@ -648,7 +645,7 @@ wnck_screen_get (int index)
     {
       screens[index] = g_object_new (WNCK_TYPE_SCREEN, NULL);
 
-      wnck_screen_construct (screens[index], index);
+      wnck_screen_construct (display, screens[index], index);
     }
 
   return screens[index];



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