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



commit 4560eea3fbf3f06c3ac5fa4542811f85a6da53fe
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jan 19 22:35:18 2011 +0100

    core: Add Screen argument to _wnck_get_atom()

 libwnck/xutils.c |    8 ++++++--
 libwnck/xutils.h |    3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 14ab259..3352341 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -209,10 +209,12 @@ _wnck_get_pixmap (Screen *screen,
 }
 
 gboolean
-_wnck_get_atom (Window  xwindow,
+_wnck_get_atom (Screen *screen,
+                Window  xwindow,
                 Atom    atom,
                 Atom   *val)
 {
+  Display *display;
   Atom type;
   int format;
   gulong nitems;
@@ -220,11 +222,13 @@ _wnck_get_atom (Window  xwindow,
   Atom *a;
   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 bb0290a..17c152b 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -52,7 +52,8 @@ gboolean _wnck_get_pixmap        (Screen *screen,
                                   Window  xwindow,
                                   Atom    atom,
                                   Pixmap *val);
-gboolean _wnck_get_atom          (Window  xwindow,
+gboolean _wnck_get_atom          (Screen *screen,
+                                  Window  xwindow,
                                   Atom    atom,
                                   Atom   *val);
 char*    _wnck_get_text_property (Window  xwindow,



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