[gnome-screensaver] window: only show panel on primary head



commit fc6695ecb9023b7049fa0dba91276d39f983425e
Author: Ray Strode <rstrode redhat com>
Date:   Mon Jun 11 11:17:56 2012 -0400

    window: only show panel on primary head
    
    This makes it match the shell better.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677793

 src/gs-window-x11.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 4c1d47c..43d383d 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -358,6 +358,9 @@ gs_window_move_resize_window (GSWindow *window,
                               gboolean  resize)
 {
         GtkWidget *widget;
+        GdkScreen *screen;
+        int        monitor;
+        int        primary_monitor;
 
         widget = GTK_WIDGET (window);
 
@@ -385,6 +388,12 @@ gs_window_move_resize_window (GSWindow *window,
                                    window->priv->geometry.width,
                                    window->priv->geometry.height);
         }
+
+        screen = gtk_widget_get_screen (widget);
+        monitor = gdk_screen_get_monitor_at_window (screen,
+                                                    gtk_widget_get_window (widget));
+        primary_monitor = gdk_screen_get_primary_monitor (screen);
+        gtk_widget_set_visible (window->priv->panel, monitor == primary_monitor);
 }
 
 static void



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