File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,12 @@ ApplicationWindow {
161161 propagateComposedEvents: true
162162
163163 onPressed : event => {
164- event .accepted = false ;
164+ // *********************************************************
165+ // fixme: Workaround QTBUG-131786 to fake modal behavior on Windows
166+ event .accepted = !! root .nativePopupOpen ;
167+ // *********************************************************
168+
169+ // event.accepted = false;
165170 root .focusCommentTable ();
166171 }
167172 }
@@ -183,4 +188,25 @@ ApplicationWindow {
183188
184189 Material .background : root .mpvqcTheme .background
185190 Material .foreground : root .mpvqcTheme .foreground
191+
192+ // *********************************************************
193+ // fixme: Workaround QTBUG-131786 to fake modal behavior on Windows
194+ property bool nativePopupOpen: false
195+ property Timer modalFaker: Timer {
196+ interval: 100
197+ onTriggered: { root .nativePopupOpen = false ; }
198+ }
199+
200+ function enableFakeModal (): void {
201+ if (Qt .platform .os === " windows" ) {
202+ root .nativePopupOpen = true ;
203+ }
204+ }
205+
206+ function disableFakeModal (): void {
207+ if (Qt .platform .os === " windows" ) {
208+ modalFaker .restart ();
209+ }
210+ }
211+ // *********************************************************
186212}
Original file line number Diff line number Diff line change 5050 return item instanceof MenuSeparator;
5151 }
5252
53+ // *********************************************************
54+ // fixme: Workaround QTBUG-131786 to fake modal behavior on Windows
55+ onAboutToShow: enableFakeModal ();
56+ onAboutToHide: disableFakeModal ();
57+ // *********************************************************
5358}
You can’t perform that action at this time.
0 commit comments