Cocoa: Don't update the menubar when popups are shown

Task-number: QTBUG-31532

Change-Id: I86084cb96bd1dd253b3e2e4413c06de053b95b3b
Reviewed-by: Romain Perier <romain.perier@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
bb10
Gabriel de Dietrich 2013-06-27 15:07:07 +02:00 committed by The Qt Project
parent 241eca33ed
commit c4dfd13f78
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ void QCocoaMenuBar::updateMenuBarImmediately()
QCocoaAutoReleasePool pool;
QCocoaMenuBar *mb = findGlobalMenubar();
QCocoaWindow *cw = findWindowForMenubar();
QWindow *win = cw ? cw->window() : 0;
if (win && (win->flags() & Qt::Popup) == Qt::Popup)
return; // context menus, comboboxes, etc. don't need to update the menubar
if (cw && cw->menubar())
mb = cw->menubar();