diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-11-23 23:30:26 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-11-24 00:04:29 +0800 |
commit | 496598a1d17599b809d981c5c3016f90eec15376 (patch) | |
tree | e34e8097e6b253f032a9be890b10cdc08c818073 /libempathy-gtk/empathy-geometry.c | |
parent | 5a09311ed6bc01870413327addfd0337d7296a7e (diff) | |
download | gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.tar gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.tar.gz gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.tar.bz2 gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.tar.lz gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.tar.xz gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.tar.zst gsoc2013-empathy-496598a1d17599b809d981c5c3016f90eec15376.zip |
Create EMPATHY_RECT_IS_ON_SCREEN macro instead of duplicating its code.
Diffstat (limited to 'libempathy-gtk/empathy-geometry.c')
-rw-r--r-- | libempathy-gtk/empathy-geometry.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-geometry.c b/libempathy-gtk/empathy-geometry.c index b807425ea..abf50d623 100644 --- a/libempathy-gtk/empathy-geometry.c +++ b/libempathy-gtk/empathy-geometry.c @@ -30,6 +30,7 @@ #include "libempathy/empathy-utils.h" #include "empathy-geometry.h" +#include "empathy-ui-utils.h" #define DEBUG_FLAG EMPATHY_DEBUG_OTHER #include <libempathy/empathy-debug.h> @@ -147,9 +148,7 @@ empathy_geometry_save (GtkWindow *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 ()) + if (!EMPATHY_RECT_IS_ON_SCREEN (x, y, w, h)) return; key_file = geometry_get_key_file (); |