Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.2.1
-
None
-
OSX 10.8.5, XCode
-
ab3a8443faa36799ab8142e48d25d8ff10f9d0bf
Description
This pertains to the 'key' and 'main' window status for a Mac window.
Currently, when 'grab' flag is false, the logic in QCocoaWindow::setMouseGrabEnabled() will resigns the window's 'key' status so long as it has it.
As a result, if user programmatically grab the mouse using QWidget::grabMouse(), and the mouse grabber happens to be a descendant widget in the 'main' window's hierarchy, when the the widget releases the mouse (i.e. releaseMouse() ), the 'main' cocoa window will lose its 'key' status. Visually, it means the 3 little red/yellow/green buttons will lose their color which won't come back until user clicks away then click back - something very hard to miss.
I would assume grab/release mouse shouldn't affect the window 'key' status if the grabbing widget happens to be part of the 'main' window that owns the 'key' to begin with.
Attached please find a patch that seems to address the issue. Same fix also need to be applied on setKeyboardGrabEnabled().
Although I ran into this on Mac with 5.2.1, the problem probably exists in earlier version of 5.x as well.
Attachments
Issue Links
- relates to
-
QTBUG-53050 Mac OS X: Floating QDockWidget is unfocused
- Closed