aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-23 23:30:26 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-24 00:04:29 +0800
commit496598a1d17599b809d981c5c3016f90eec15376 (patch)
treee34e8097e6b253f032a9be890b10cdc08c818073 /libempathy-gtk/empathy-ui-utils.c
parent5a09311ed6bc01870413327addfd0337d7296a7e (diff)
downloadgsoc2013-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-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index be6aaa249..9ba01738d 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1313,9 +1313,7 @@ empathy_window_present (GtkWindow *window,
* reposition on the current workspace. */
gtk_window_get_position (window, &x, &y);
gtk_window_get_size (window, &w, &h);
- 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))
gtk_widget_hide (GTK_WIDGET (window));
}