Qt 5.8 has a bit changed and ungrabbing at show does not work.
Details
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Lint
Lint Skipped - Unit
Unit Tests Skipped
sorry if this is irrelevant...
I dont know if the above code works but in my code tree in latte dock I can not do anything to ungrabMouse in Qt 5.8 in case the user closes the menu by deactivating it with a click at the outside area (that is not the window area or the menu one)...
I have filed a bug at: https://bugreports.qt.io/browse/QTBUG-59044
I thought that this might be relevant to my qt bug report...
I'm not pretty sure, but
https://code.woboq.org/qt5/qtbase/src/widgets/kernel/qwidgetwindow.cpp.html#374
on click at other window we have enter && mouseGrabber
You can observe the faulty behavior even with Qt's "Menu's Example".
- Open any menu you want either with right click or from the menu
- Close it by clicking in any outside area you want, that is (not inside the menu example window and not in the menu)
- Observe that you can not even hover at the menus on top. For the window to work as expected someone must click first in the example window.
at (3) the menu example window should work as normal...
I just noticed...
you dont have to go too far...
any qt application using 5.8 has this problem...
even qtcreator...
showing a menu and then deactivating it from outside areas then the window needs a click from the user
in order for this window to react properly
this on released Qt 5.8? on 5.8 branch?
i can't reproduce with my 5.8 build here.
anyways, that beahvior change would be a Qt bug (one of the many the terrible 5.8 release had) and should be fixed upstream
the indicated if (!enter || !QWidget::mouseGrabber()) { code was added in 2012, so can't be the responsible of the change
I am using Qt 5.8 from http://download.opensuse.org/repositories/KDE:/Qt5/openSUSE_Leap_42.2/
I think this is the released version...
in my system I am doing the folowing:
- open a qtcreator
- notice the hovering works at the menu bar
- activate any menu from the top menu bar
- deactivate this menu by clicking on the desktop
- going the mouse above the qt creator's menu bar then hovering is not working, the user must click into the qtcreator in order for hovering to work again