[libwnck] core: Add Screen argument to _wnck_get_pixmap()



commit 3a41fe828f0723471e4182155ecc46308745d28c
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jan 19 22:33:56 2011 +0100

    core: Add Screen argument to _wnck_get_pixmap()

 libwnck/screen.c |    3 ++-
 libwnck/xutils.c |    8 ++++++--
 libwnck/xutils.h |    3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libwnck/screen.c b/libwnck/screen.c
index eb5ee71..b426630 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -2152,7 +2152,8 @@ update_bg_pixmap (WnckScreen *screen)
   screen->priv->need_update_bg_pixmap = FALSE;
 
   p = None;
-  _wnck_get_pixmap (screen->priv->xroot,
+  _wnck_get_pixmap (WNCK_SCREEN_XSCREEN (screen),
+                    screen->priv->xroot,
                     _wnck_atom_get ("_XROOTPMAP_ID"),
                     &p);
   /* may have failed, so p may still be None */
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index e892431..14ab259 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -165,10 +165,12 @@ _wnck_get_window (Screen *screen,
 }
 
 gboolean
-_wnck_get_pixmap (Window  xwindow,
+_wnck_get_pixmap (Screen *screen,
+                  Window  xwindow,
                   Atom    atom,
                   Pixmap *val)
 {
+  Display *display;
   Atom type;
   int format;
   gulong nitems;
@@ -176,11 +178,13 @@ _wnck_get_pixmap (Window  xwindow,
   Window *w;
   int err, result;
 
+  display = DisplayOfScreen (screen);
+
   *val = 0;
 
   _wnck_error_trap_push ();
   type = None;
-  result = XGetWindowProperty (_wnck_get_default_display(),
+  result = XGetWindowProperty (display,
 			       xwindow,
 			       atom,
 			       0, G_MAXLONG,
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 6407cc0..bb0290a 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -48,7 +48,8 @@ gboolean _wnck_get_window        (Screen *screen,
                                   Window  xwindow,
                                   Atom    atom,
                                   Window *val);
-gboolean _wnck_get_pixmap        (Window  xwindow,
+gboolean _wnck_get_pixmap        (Screen *screen,
+                                  Window  xwindow,
                                   Atom    atom,
                                   Pixmap *val);
 gboolean _wnck_get_atom          (Window  xwindow,



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