aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-misc-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-misc-utils.c')
-rw-r--r--e-util/e-misc-utils.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/e-util/e-misc-utils.c b/e-util/e-misc-utils.c
index 59e6e67eb2..ae034d6a3b 100644
--- a/e-util/e-misc-utils.c
+++ b/e-util/e-misc-utils.c
@@ -363,12 +363,20 @@ e_restore_window (GtkWindow *window,
data->premax_height = height;
monitor = gdk_screen_get_monitor_at_point (screen, x, y);
- if (monitor < 0 || monitor >= gdk_screen_get_n_monitors (screen))
+ if (monitor < 0)
monitor = 0;
- gdk_screen_get_monitor_workarea (screen, monitor, &monitor_area);
+ if (monitor >= gdk_screen_get_n_monitors (screen))
+ monitor = 0;
+
+ gdk_screen_get_monitor_workarea (
+ screen, monitor, &monitor_area);
+
+ gtk_window_resize (
+ window,
+ monitor_area.width,
+ monitor_area.height);
- gtk_window_resize (window, monitor_area.width, monitor_area.height);
gtk_window_maximize (window);
}
}