https://github.com/wxWidgets/wxWidgets/pull/26137
(5 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Note to self: make QtSetWindowModality() a non virtual member of wxTLW
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@AliKet pushed 3 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
Thanks, I'm ok with merging this, but it looks like this approach points to even better solution: add wxTLW::SetWindowModality() (or maybe ShowWithModality()?) and implement it different for wxQt (using the code from this PR) and the other ports (using the existing wxWindowDisabler-based code from print preview).
Please let me know if you'd like to update this PR to do this or prefer to apply it as is.
Thanks!
> @@ -47,6 +47,18 @@ class WXDLLIMPEXP_CORE wxTopLevelWindowQt : public wxTopLevelWindowBase
virtual void SetWindowStyleFlag( long style ) override;
virtual long GetWindowStyleFlag() const override;
+ // Values of this enum are synchronized with Qt::WindowModality ones
+ enum wxQtWindowModality
Especially if we make this enum public (in wxTLW), I'd make it a scoped enum called just Modality with values None, Window and App.
> @@ -1831,6 +1835,18 @@ void wxPreviewFrame::InitializeWithModality(wxPreviewFrameModalityKind kind)
// Nothing to do, we don't need to disable any windows.
break;
}
+#else // __WXQT__
+ wxQtWindowModality qtWindowModality;
+
+ if ( m_modalityKind == wxPreviewFrame_AppModal )
Minor, but I always prefer using switch for enums, and it would be more consistent with the code above.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, I'm ok with merging this, but it looks like this approach points to even better solution: add
wxTLW::SetWindowModality()(or maybeShowWithModality()?) and implement it different for wxQt (using the code from this PR) and the other ports (using the existingwxWindowDisabler-based code from print preview).
Please let me know if you'd like to update this PR to do this or prefer to apply it as is.
I'am working on this and will push the changes soon...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()