]> spindle.queued.net Git - midori/commitdiff
Handle menubar in fullscreen like other bars
authorPeter Hatina <phatina@redhat.com>
Fri, 13 Jan 2012 22:42:16 +0000 (23:42 +0100)
committerChristian Dywan <christian@twotoasts.de>
Fri, 13 Jan 2012 22:42:16 +0000 (23:42 +0100)
Related to: https://bugs.launchpad.net/midori/+bug/783675

midori/midori-browser.c

index 6b58f2904b3e0dbd28faffff9f7672bcc7fe0c38..e164e1b5537418c268d0c813d753afb659bf025b 100644 (file)
@@ -3450,6 +3450,9 @@ _action_fullscreen_activate (GtkAction*     action,
     state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
     if (state & GDK_WINDOW_STATE_FULLSCREEN)
     {
+        if (katze_object_get_boolean (G_OBJECT (browser->settings), "show-menubar"))
+            gtk_widget_show (browser->menubar);
+
         if (katze_object_get_boolean (G_OBJECT (browser->settings), "show-panel"))
             gtk_widget_show (browser->panel);
 
@@ -3467,6 +3470,7 @@ _action_fullscreen_activate (GtkAction*     action,
     }
     else
     {
+        gtk_widget_hide (browser->menubar);
         gtk_widget_hide (browser->panel);
         gtk_widget_hide (browser->bookmarkbar);
         gtk_widget_hide (browser->navigationbar);
@@ -5410,19 +5414,6 @@ midori_browser_window_state_event_cb (MidoriBrowser*       browser,
     else if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
         window_state = MIDORI_WINDOW_FULLSCREEN;
     g_object_set (browser->settings, "last-window-state", window_state, NULL);
-
-    if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)
-    {
-        if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
-        {
-            gtk_widget_hide (browser->menubar);
-        }
-        else
-        {
-            if (katze_object_get_boolean (browser->settings, "show-menubar"))
-                gtk_widget_show (browser->menubar);
-        }
-    }
 }
 
 static gboolean