[libwnck] core: Add Screen argument to _wnck_iconify(), _wnck_deiconify()



commit 6732979e8624f3fa967c0d921bf89a44b2323ff3
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jan 19 23:21:59 2011 +0100

    core: Add Screen argument to _wnck_iconify(), _wnck_deiconify()

 libwnck/window.c |    3 ++-
 libwnck/xutils.c |   10 ++++++----
 libwnck/xutils.h |    6 ++++--
 3 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/libwnck/window.c b/libwnck/window.c
index 3bad7a5..28fc13d 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -1434,7 +1434,8 @@ wnck_window_minimize                (WnckWindow *window)
 {
   g_return_if_fail (WNCK_IS_WINDOW (window));
 
-  _wnck_iconify (window->priv->xwindow);
+  _wnck_iconify (WNCK_SCREEN_XSCREEN (window->priv->screen),
+                 window->priv->xwindow);
 }
 
 /**
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 1f7d430..efd140a 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -816,11 +816,12 @@ _wnck_xid_hash (gconstpointer v)
 }
 
 void
-_wnck_iconify (Window xwindow)
+_wnck_iconify (Screen *screen,
+               Window  xwindow)
 {
   Display *display;
 
-  display = _wnck_get_default_display ();
+  display = DisplayOfScreen (screen);
 
   _wnck_error_trap_push ();
   XIconifyWindow (display, xwindow, DefaultScreen (display));
@@ -828,7 +829,8 @@ _wnck_iconify (Window xwindow)
 }
 
 void
-_wnck_deiconify (Window xwindow)
+_wnck_deiconify (Screen *screen,
+                 Window  xwindow)
 {
   /* We need special precautions, because GDK doesn't like
    * XMapWindow() called on its windows, need to use the
@@ -843,7 +845,7 @@ _wnck_deiconify (Window xwindow)
   if (gdkwindow)
     gdk_window_show (gdkwindow);
   else
-    XMapRaised (_wnck_get_default_display (), xwindow);
+    XMapRaised (DisplayOfScreen (screen), xwindow);
   _wnck_error_trap_pop ();
 }
 
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 04016ea..3b061ab 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -98,8 +98,10 @@ int   _wnck_xid_equal (gconstpointer v1,
                        gconstpointer v2);
 guint _wnck_xid_hash  (gconstpointer v);
 
-void _wnck_iconify   (Window xwindow);
-void _wnck_deiconify (Window xwindow);
+void _wnck_iconify   (Screen *screen,
+                      Window  xwindow);
+void _wnck_deiconify (Screen *screen,
+                      Window  xwindow);
 
 void _wnck_close     (Screen *screen,
 		      Window  xwindow,



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