Fullscreen does not hide toolbars

Bug #783675 reported by Arturo Torres Sánchez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Wishlist
Unassigned

Bug Description

Midori 0.3.6

When I go to fullscreen, the window maximizes and loses its decorations, which is good; but toolbars and tabbars are not hidden, making fullscreen not that different from maximized state.

For example, both Chrome and Firefox hides their bars and shows only the webpage, and bars reappear when hovering the top edge. This should also be implemented in Midori.

Tags: fullscreen
Michael Moroni (airon90)
tags: added: fullscreen
Changed in midori:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Peter Hatina (phatina) wrote :

When entering a fullscreen mode, navigation bar hides, bookmark bar as well, also status bar, side panel and tabs. What you get, is the content of the web page. If the fullscreen mode is activated, I added a menu item for popup menu (right click in webpage) to exit fullscreen mode.

Revision history for this message
Cris Dywan (kalikiana) wrote :

You need to honor browser->show_tabs there. It's prominently used by the Tab Panel extension to replace the tab bar.

I used to have a hard time making the right call here. I will happily go with your suggestion if nobody objects with a good reason, after the release.

Revision history for this message
Peter Hatina (phatina) wrote :

Kalikiana, fixed.

Revision history for this message
Peter Hatina (phatina) wrote :
Revision history for this message
Cris Dywan (kalikiana) wrote :

I realized just before committing that it's not necessarily to check the settings when hiding the bars, so I scrapped them. Thanks for the patch!

Changed in midori:
status: Confirmed → Fix Committed
Revision history for this message
Peter Hatina (phatina) wrote :

Hides the notebook borders, when entering fullscreen with more than one tab.

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

This seems a bit off in Midori 0.4.2 on Ubuntu 11.10; When I first Fullscreen the window, all the toolbars (including the tab bar) get hidden. However, after opening a new tab (and then clicking anywhere to make the toolbar disappear again), the tab bar remains (which I feel it should have from the start).

Revision history for this message
Peter Hatina (phatina) wrote :
Revision history for this message
Cris Dywan (kalikiana) wrote :

Peter, I'm afraid that patch is wrong in that form. There are several ways to create a tab, from a URI, item or widget. Ultimately midori_browser_add_tab is the one that is *always* called. Further more _toggle_tabbar_smartly is the canonical place to say if the tab bar should be there or not.
So I refined _toggle_tabbar_smartly and also introduced midori_browser_is_fullscreen to simplify some code. Unfortunately I had to add a boolean ignore_fullscreen for the case where "fullscreen becomes normal" and the window state has not yet been updated. I hesitated to keep state in the browser.

Revision history for this message
Peter Hatina (phatina) wrote :

Christian, okay. First patch, that hides GtkNotebook borders when entering fullscreen is (imho) okay, isn't it? If you are using a theme, which has wider borders, this can appear in the top of the window.. I didn't see this, due to other theme.

Revision history for this message
Cris Dywan (kalikiana) wrote :

The border shows whenever tabs show, in _toggle_tabbar_smartly, so this should be taken care of. If not, please give the steps and theme name for testing it.

Revision history for this message
Peter Hatina (phatina) wrote :

Christian, I haven't noticed, that you added _toggle_tabbar_smartly. OK, I assume, this should be used for fullscreen way (as unfullscreen). In that function you are using midori_browser_is_fullscreen, which can return false value due to compositor state. I moved the code, which takes care of showing/hiding necessary widgets, into midori_browser_window_state_event_cb, where the midori_browser_is_fullscreen returns the correct value and fullscreen will work without any problem.

After your patch (Teach _toggle_tabbar_smartly what fullscreen means), you added only one call _toggle_tabber_smartly. Having that call added also to fullscreen, tabs wouldn't be shown on the very first call.

Maybe, we can meet our opinions, this might be the best way, can't we?

Revision history for this message
Peter Hatina (phatina) wrote :

I also attach a screenshot from current git code. I am using gtk+ 2.24.8 and gtk+2.0 theme adwaita 3.2.1. You can notice, that there is a gray stripe in the very top of the window.

Revision history for this message
Cris Dywan (kalikiana) wrote :

_toogle_tabbar_smartly has existed for some time, but I added 'ignore_fullscreen' just recently for this exact use case. The reason I didn't go for the state-based approach is that, as far as I know, we cannot rely on the state event, it could come late, or not at all. It is not GTK+ but the window manager that emits it asynchronously. We would need our own state keeping if we want this to be reliable. Hence my 'ignore_fullscreen' workaround.

Revision history for this message
Peter Hatina (phatina) wrote :

Christan, why don't you like the signal-based approach? It seems to be more reliable. For the first time, it looked okay to use in "old" way, but due to compositor, I find it better to move the code which takes care of hiding necessary widgets into midori_browser_window_state_event_cb.

Revision history for this message
Cris Dywan (kalikiana) wrote :

We have no guarantee it is ever emitted, the window manager is responsible for it. It can be heavily delayed or lost. So by my definition of reliable, that's the opposite of it. I don't follow why you mention the compositor; let's assume it is more reliable than non-accelerated window managers, we still need to support different window managers.

Revision history for this message
Peter Hatina (phatina) wrote :

Okay, I will describe this in other way. Go fullscreen and you will see GtkNotebook border, which is not hidden. Then add a new tab, the border will hide.

Revision history for this message
Cris Dywan (kalikiana) wrote :

I took another look at the code. The fullscreen action was missing a call to hide the border. Your state-based patch accidentally solved this by always calling _toggle_tabbar_smartly.

Revision history for this message
Peter Hatina (phatina) wrote :

Shouldn't we also have show/hide menubar in _action_fullscreen_activate? In current state, it kind of fragmented - you previously said, the event isn't supposed to arrive at 100%, so this will also show/hide menubar.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Fully right, the menubar should be handled the same way. Thanks for the patch.

Cris Dywan (kalikiana)
Changed in midori:
status: Fix Committed → Fix Released
Revision history for this message
Penchal Reddy T y (penchalreddy018) wrote :

Hi All,

Can someone answer/help me here:

I have a midori source code.
Where i can enable and disable the "menu bar" and "tool bar" and "scroll bar" in the code. ?

your help is much appreciated.

Thanks in advance,

-PR

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.