diff options
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 2345d70654..f82931cec0 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1926,20 +1926,22 @@ e_shell_cancel_quit (EShell *shell) * a given screen. **/ void -e_shell_adapt_window_size (EShell *shell, - GtkWindow *window) +e_shell_adapt_window_size (EShell *shell, + GtkWindow *window) { - gint monitor; - GdkScreen *scr; + GdkScreen *screen; GdkRectangle rect; + GdkWindow *gdk_window; + gint monitor; if (!e_shell_get_meego_mode (shell) || !e_shell_get_small_screen_mode (shell)) return; - scr = gdk_screen_get_default (); - monitor = gdk_screen_get_monitor_at_window (scr, GTK_WIDGET (window)->window); - gdk_screen_get_monitor_geometry (scr, monitor, &rect); + screen = gdk_screen_get_default (); + gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); + monitor = gdk_screen_get_monitor_at_window (screen, gdk_window); + gdk_screen_get_monitor_geometry (screen, monitor, &rect); gtk_window_set_default_size (window, rect.width, rect.height); gtk_window_set_decorated (window, FALSE); |