-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QWindow: move context menu synthesis code into private virtual
QQuickWindow needs to be able to call this to ensure that it gets the context menu event after the mouse event, and not the other way around, otherwise the menu is immediately closed after opening. Move the code into QWindowPrivate::maybeSynthesizeContextMenuEvent(), which is called only for mouse press and release events, and which does the synthesis only if the event was not already accepted and has no exclusive grabber. Use scenePosition() to avoid getting a localized position left over from delivery to specific widgets or Qt Quick items. Add explanations to internal docs. This also opens up the opportunity for QQuickWindowPrivate to do this in a Qt Quick-specific way. Task-number: QTBUG-67331 Task-number: QTBUG-93486 Change-Id: I909671d9d62c9007b22646cbea6eede7465ab686 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Jan Arve Sæther <[email protected]>
- Loading branch information
1 parent
40c3b28
commit 9f75fe2
Showing
2 changed files
with
54 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters