Menu disappears if a window is hidden and then shown again

Bug #1451946 reported by Oleg Shparber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
appmenu-qt5 (Ubuntu)
In Progress
High
Łukasz Zemczak
indicator-appmenu (Ubuntu)
New
High
Unassigned

Bug Description

If a Qt 5 application window becomes hidden (QWidget::hide()) and then shown again, it loses its global menu.

I have attached a simple application to show the problem. It occurs on Ubuntu 14.04 LTS with stock Qt 5.2.1.

Revision history for this message
Oleg Shparber (trollixx) wrote :
Changed in appmenu-qt5 (Ubuntu):
assignee: nobody → Łukasz Zemczak (sil2100)
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Also reproduced on 15.04, seems to be an overall problem with our approach in Qt 5. I'll try to find some free cycles to take a closer look into this ASAP.

Changed in appmenu-qt5 (Ubuntu):
status: New → Triaged
Changed in appmenu-qt5 (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I've done some quick checks, and from an Unity point of view, this is not a problem in unity side. The menus are not exported from unity-panel-service.

This means that they are not re-registered with indicator-appmenu or that it doesn't handle them well (but it's more likely something inside appmenu-qt5).

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thanks for looking into that Marco! I think the problem might be indeed something with indicator-appmenu. I checked appmenu-qt5 and everything seems fine there: appmenu-qt5 fetches the related QMenu and exports it through DBus. During the hide/show the menu stays the same, the window stays the same, so appmenu-qt5 has no reason to re-export it again as all the previous contents are valid - and appmenu-qt5 really doesn't do much more. It only re-exports menus when the menu parent changes, or the menu itself. Here it has no reason to do that as none of the important bits (the winId or the QMenu) changed. But somehow, the once exported menu is invalidated/lost somewhere.

Adding indicator-appmenu to the investigation.

Changed in indicator-appmenu (Ubuntu):
assignee: nobody → Łukasz Zemczak (sil2100)
status: New → In Progress
Changed in appmenu-qt5 (Ubuntu):
importance: Undecided → High
Changed in indicator-appmenu (Ubuntu):
importance: Undecided → High
Changed in indicator-appmenu (Ubuntu):
assignee: Łukasz Zemczak (sil2100) → nobody
status: In Progress → Invalid
Changed in indicator-appmenu (Ubuntu):
status: Invalid → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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