aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-geometry.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-23 15:50:12 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-24 00:04:28 +0800
commit05ecb3d3c81446517a71eaa884076efb9d3ae35a (patch)
treed58d9661d8e53af8d9b8a1a63c57d55a03de6e44 /libempathy-gtk/empathy-geometry.c
parentcca12d5ca2612c344dd395da63a63c5a8c0a7969 (diff)
downloadgsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.tar
gsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.tar.gz
gsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.tar.bz2
gsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.tar.lz
gsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.tar.xz
gsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.tar.zst
gsoc2013-empathy-05ecb3d3c81446517a71eaa884076efb9d3ae35a.zip
Make sure to not save offscreen positioning. It happens with compiz.
Diffstat (limited to 'libempathy-gtk/empathy-geometry.c')
-rw-r--r--libempathy-gtk/empathy-geometry.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-geometry.c b/libempathy-gtk/empathy-geometry.c
index 9895c614e..d17d22cb9 100644
--- a/libempathy-gtk/empathy-geometry.c
+++ b/libempathy-gtk/empathy-geometry.c
@@ -142,6 +142,12 @@ empathy_geometry_save (GtkWindow *window,
window_state = gdk_window_get_state (gdk_window);
maximized = (window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
+ /* Don't save off-screen positioning */
+ if (x + w < 0 || y + h < 0 ||
+ x > gdk_screen_width () ||
+ y > gdk_screen_height ())
+ return;
+
key_file = geometry_get_key_file ();
/* Save window size only if not maximized */