chiark / gitweb /
More careful about compact mode transition detection
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 28 Nov 2009 16:32:18 +0000 (16:32 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 28 Nov 2009 16:32:18 +0000 (16:32 +0000)
disobedience/menu.c

index fc4662d..f54fe4a 100644 (file)
@@ -446,8 +446,11 @@ GtkWidget *menubar(GtkWidget *w) {
 
 static void toggled_minimode(GtkCheckMenuItem  *item,
                              gpointer attribute((unused)) userdata) {
-  full_mode = !gtk_check_menu_item_get_active(item);
-  event_raise("mini-mode-changed", NULL);
+  int new_full_mode = !gtk_check_menu_item_get_active(item);
+  if(full_mode != new_full_mode) {
+    full_mode = new_full_mode;
+    event_raise("mini-mode-changed", NULL);
+  }
 }
 
 /*