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



commit 2ce7addc6ad415a34499715c1996cd600d281da5
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jan 19 23:02:17 2011 +0100

    core: Add Screen argument to _wnck_get_utf8_list()

 libwnck/screen.c |    3 ++-
 libwnck/xutils.c |   10 +++++++---
 libwnck/xutils.h |    5 +++--
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/libwnck/screen.c b/libwnck/screen.c
index 4a92b9c..e9f41be 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -2121,7 +2121,8 @@ update_workspace_names (WnckScreen *screen)
 
   screen->priv->need_update_workspace_names = FALSE;
 
-  names = _wnck_get_utf8_list (screen->priv->xroot,
+  names = _wnck_get_utf8_list (WNCK_SCREEN_XSCREEN (screen),
+                               screen->priv->xroot,
                                _wnck_atom_get ("_NET_DESKTOP_NAMES"));
 
   copy = g_list_copy (screen->priv->workspaces);
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 71bd3c5..783bc76 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -561,9 +561,11 @@ _wnck_get_cardinal_list (Screen  *screen,
 }
 
 char**
-_wnck_get_utf8_list (Window   xwindow,
-                     Atom     atom)
+_wnck_get_utf8_list (Screen *screen,
+                     Window  xwindow,
+                     Atom    atom)
 {
+  Display *display;
   Atom type;
   int format;
   gulong nitems;
@@ -576,12 +578,14 @@ _wnck_get_utf8_list (Window   xwindow,
   guint n_strings;
   char *p;
 
+  display = DisplayOfScreen (screen);
+
   utf8_string = _wnck_atom_get ("UTF8_STRING");
 
   _wnck_error_trap_push ();
   type = None;
   val = NULL;
-  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 a100bb9..949e78f 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -77,8 +77,9 @@ gboolean _wnck_get_cardinal_list (Screen  *screen,
                                   Atom     atom,
                                   gulong **cardinals,
                                   int     *len);
-char**   _wnck_get_utf8_list     (Window   xwindow,
-                                  Atom     atom);
+char**   _wnck_get_utf8_list     (Screen *screen,
+                                  Window  xwindow,
+                                  Atom    atom);
 
 void     _wnck_set_utf8_list     (Window   xwindow,
                                   Atom     atom,



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