aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-16 04:38:57 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-16 20:24:22 +0800
commit13b916845f7bd4762e2709a99456986bde12b3d9 (patch)
treecba6d4000179b9b8d6ef8f61ceba28b48262abb8
parent441909cbcd7c740f49b714b61e31a5236d808538 (diff)
downloadgsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.tar
gsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.tar.gz
gsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.tar.bz2
gsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.tar.lz
gsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.tar.xz
gsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.tar.zst
gsoc2013-empathy-13b916845f7bd4762e2709a99456986bde12b3d9.zip
Reload the main window geometry when deiconify to workaround WM bugs.
-rw-r--r--src/empathy-main-window.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 2a316b99e..bfd6b8991 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -1194,6 +1194,21 @@ account_manager_prepared_cb (GObject *source_object,
g_list_free (accounts);
}
+static gboolean
+main_window_state_event_cb (GtkWidget *widget,
+ GdkEventWindowState *event,
+ EmpathyMainWindow *window)
+{
+ /* Force reloading geometry because some WM lose it in the
+ * iconify/deiconify process */
+ if ((event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) != 0 &&
+ (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) == 0) {
+ empathy_geometry_load (GTK_WINDOW (window->window), GEOMETRY_NAME);
+ }
+
+ return FALSE;
+}
+
GtkWidget *
empathy_main_window_show (void)
{
@@ -1242,6 +1257,7 @@ empathy_main_window_show (void)
empathy_builder_connect (gui, window,
"main_window", "destroy", main_window_destroy_cb,
+ "main_window", "window-state-event", main_window_state_event_cb,
"chat_quit", "activate", main_window_chat_quit_cb,
"chat_new_message", "activate", main_window_chat_new_message_cb,
"view_history", "activate", main_window_view_history_cb,