the menubar with appmenu-gtk is 1px tall

Bug #705112 reported by Andrea Cimitan
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

the menubar is still present in the window, 1px of height. should be hidden

Tags: patch
Revision history for this message
Andrea Cimitan (cimi) wrote :

In this patch, I've removed the code which uses requisition, and I simply show/hide the menubar.
I was frightened that this could have broken something, but it seems to work fine, and cody told me to proceed with that.
If we find any kind of regression, going back is easy.

It fixes an annoying visual bug

Revision history for this message
Andrea Cimitan (cimi) wrote :

Overriding gtk_menu_bar_show, to make sure it will always hide the bar (need testing)

tags: added: patch
Omer Akram (om26er)
Changed in gtk+2.0 (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Andrea Cimitan (cimi) wrote :

Seb? could you please update the gtk+ package with that patch?

Changed in gtk+2.0 (Ubuntu):
assignee: nobody → Didier Roche (didrocks)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey Cimi,

the patch unfortunatly fails to be build there, did you try on an updated natty?
You can find the relevant part of the build log here: http://paste.ubuntu.com/565326/

Unsusbcribing ubuntu sponsor for now.

Revision history for this message
Andrea Cimitan (cimi) wrote :

I'm trying a dpkg-buildpackage with this

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.24.0-0ubuntu2

---------------
gtk+2.0 (2.24.0-0ubuntu2) natty; urgency=low

  * update debian/patches/043_ubuntu_menu_proxy.patch:
    - fix the menubar with appmenu-gtk is 1px tall (by Cimi) (LP: #705112)
 -- Didier Roche <email address hidden> Thu, 10 Feb 2011 13:43:42 +0100

Changed in gtk+2.0 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Santtu Lakkala (inz) wrote :

The patch breaks applications that don't want to show a menubar on startup (I noticed it with gnome-terminal). Attached file shows broken behavior: even though menubar is explicitly hidden, it still shows up when run.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new issue is bug #717358

Revision history for this message
Andrea Cimitan (cimi) wrote :

Ok, I should update the patch

Revision history for this message
Santtu Lakkala (inz) wrote :

The updated patch helps with the issue, but some kind of race still prevails. The updated test program sometimes shows and sometimes hides the bar. Upping the priority to G_PRIORITY_HIGH_IDLE shows the menubar (nearly) every time.

Revision history for this message
Santtu Lakkala (inz) wrote :

Found the problem to be that GtkWidgetClass::hide is only called if the widget was visible, thus if the call order is:
1. show()
2. hide()
3. local_notify(local = 1)

the menubar remains shown, but if the call order is:
1. show()
2. local_notify(local = 1)
3. hide()

things work correctly.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Reopening the bug and reverting the patch for now since it breaks things

Changed in gtk+2.0 (Ubuntu):
status: Fix Released → Triaged
assignee: Didier Roche (didrocks) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks Santtu for your work, we will get an updated patch in when the issues are solved

Revision history for this message
Andrea Cimitan (cimi) wrote :

@Santtu:
with my patch, the menubar is never shown with your test app... are you sure you tried my updated patch?
Also, looking at my code, I can't find anything wrong that could cause a failure.

Revision history for this message
Andrea Cimitan (cimi) wrote :

I see what could cause a failure, we should simply don't call gtk_widget_show/hide but gtk_menu_bar_local_show/hide and set there the private structure, no need of new signals like in your patch

Revision history for this message
Santtu Lakkala (inz) wrote :

As discussed with Cimi on irc, this one now uses unmap/map to avoid setting the GTK_VISIBLE flag, so that the notifications come through correctly.

Revision history for this message
Andrea Cimitan (cimi) wrote :

the only thing I would do is trying to make the coding style a little bit more consistent with the rest of gtk+, like the order of variables/g_return_if_fail. aparto from that, I trust you if you tested it and it seems to work. did you test it globally and in all your previous testcases? if so, seb, could you add this in the next gtk+? I need that for some theming changes. many thanks santtu for your precious work

Revision history for this message
Santtu Lakkala (inz) wrote :

This patch fixes a couple of coding style issues and simplifies gtk_menubar_show and _hide.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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