[gnome-session] fail-whale: fix positioning of window



commit d7abfce0a92a4d69a01839e2e8e4480b5239235d
Author: Ray Strode <rstrode redhat com>
Date:   Tue Mar 5 23:36:26 2013 -0500

    fail-whale: fix positioning of window
    
    The fail whale wasn't always getting positioned right.
    
    This commit seems to fix it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695265

 gnome-session/gsm-fail-whale-dialog.c |   27 ++++++++-------------------
 1 files changed, 8 insertions(+), 19 deletions(-)
---
diff --git a/gnome-session/gsm-fail-whale-dialog.c b/gnome-session/gsm-fail-whale-dialog.c
index 323386c..f35be6a 100644
--- a/gnome-session/gsm-fail-whale-dialog.c
+++ b/gnome-session/gsm-fail-whale-dialog.c
@@ -69,18 +69,11 @@ _window_override_user_time (GsmFailWhaleDialog *window)
         gdk_x11_window_set_user_time (gtk_widget_get_window (GTK_WIDGET (window)), ev_time);
 }
 
-/* copied from panel-toplevel.c */
 static void
 _window_move_resize_window (GsmFailWhaleDialog *window,
                             gboolean  move,
                             gboolean  resize)
 {
-        GtkWidget *widget;
-
-        widget = GTK_WIDGET (window);
-
-        g_assert (gtk_widget_get_realized (widget));
-
         if (window->priv->debug_mode)
                 return;
 
@@ -90,21 +83,17 @@ _window_move_resize_window (GsmFailWhaleDialog *window,
                  window->priv->geometry.width,
                  window->priv->geometry.height);
 
-        if (move && resize) {
-                gdk_window_move_resize (gtk_widget_get_window (widget),
-                                        window->priv->geometry.x,
-                                        window->priv->geometry.y,
-                                        window->priv->geometry.width,
-                                        window->priv->geometry.height);
-        } else if (move) {
-                gdk_window_move (gtk_widget_get_window (widget),
-                                 window->priv->geometry.x,
-                                 window->priv->geometry.y);
-        } else if (resize) {
-                gdk_window_resize (gtk_widget_get_window (widget),
+        if (resize) {
+                gtk_window_resize (GTK_WINDOW (window),
                                    window->priv->geometry.width,
                                    window->priv->geometry.height);
         }
+
+        if (move) {
+                gtk_window_move (GTK_WINDOW (window),
+                                 window->priv->geometry.x,
+                                 window->priv->geometry.y);
+        }
 }
 
 static void


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