[empathy] Make sure to not save offscreen positioning. It happens with compiz.
- From: Xavier Claessens <xclaesse src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Make sure to not save offscreen positioning. It happens with compiz.
- Date: Mon, 23 Nov 2009 16:04:37 +0000 (UTC)
commit 05ecb3d3c81446517a71eaa884076efb9d3ae35a
Author: Xavier Claessens <xclaesse gmail com>
Date: Mon Nov 23 08:50:12 2009 +0100
Make sure to not save offscreen positioning. It happens with compiz.
libempathy-gtk/empathy-geometry.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-geometry.c b/libempathy-gtk/empathy-geometry.c
index 9895c61..d17d22c 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]