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



commit 20614594c5a2184794df9bc3b2a8ebbfe7b917aa
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jan 19 23:04:08 2011 +0100

    core: Add Screen argument to _wnck_set_utf8_list()

 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 e9f41be..8c73599 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -2743,7 +2743,8 @@ _wnck_screen_change_workspace_name (WnckScreen *screen,
       ++i;
     }
 
-  _wnck_set_utf8_list (screen->priv->xroot,
+  _wnck_set_utf8_list (WNCK_SCREEN_XSCREEN (screen),
+                       screen->priv->xroot,
                        _wnck_atom_get ("_NET_DESKTOP_NAMES"),
                        names);
 
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 783bc76..77c5c89 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -653,14 +653,18 @@ _wnck_get_utf8_list (Screen *screen,
 }
 
 void
-_wnck_set_utf8_list (Window   xwindow,
+_wnck_set_utf8_list (Screen  *screen,
+                     Window   xwindow,
                      Atom     atom,
                      char   **list)
 {
+  Display *display;
   Atom utf8_string;
   GString *flattened;
   int i;
 
+  display = DisplayOfScreen (screen);
+
   utf8_string = _wnck_atom_get ("UTF8_STRING");
 
   /* flatten to nul-separated list */
@@ -675,7 +679,7 @@ _wnck_set_utf8_list (Window   xwindow,
 
   _wnck_error_trap_push ();
 
-  XChangeProperty (_wnck_get_default_display(),
+  XChangeProperty (display,
 		   xwindow,
                    atom,
 		   utf8_string, 8, PropModeReplace,
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 949e78f..04016ea 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -81,7 +81,8 @@ char**   _wnck_get_utf8_list     (Screen *screen,
                                   Window  xwindow,
                                   Atom    atom);
 
-void     _wnck_set_utf8_list     (Window   xwindow,
+void     _wnck_set_utf8_list     (Screen  *screen,
+                                  Window   xwindow,
                                   Atom     atom,
                                   char   **list);
 



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