The proper fix for subwindow parenting issues.
The previous patch tried to work around the fact that Qt::SubWindow accidentally pulled in Qt::Window. This patch corrects the root cause of the problem.
This commit is contained in:
parent
b48abb631f
commit
ef8e5af1d2
@ -278,7 +278,7 @@ public:
|
||||
ToolTip = Popup | Sheet,
|
||||
SplashScreen = ToolTip | Dialog,
|
||||
Desktop = 0x00000010 | Window,
|
||||
SubWindow = Desktop | Dialog,
|
||||
SubWindow = 0x00000012,
|
||||
|
||||
WindowType_Mask = 0x000000ff,
|
||||
MSWindowsFixedSizeDialogHint = 0x00000100,
|
||||
|
@ -96,6 +96,12 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
||||
QWindowSurface *surface = q->windowSurface();
|
||||
|
||||
QWindow *win = topData()->window;
|
||||
// topData() ensures the extra is created but does not ensure 'window' is non-null
|
||||
// in case the extra was already valid.
|
||||
if (!win) {
|
||||
createTLSysExtra();
|
||||
win = topData()->window;
|
||||
}
|
||||
|
||||
win->setWindowFlags(data.window_flags);
|
||||
win->setGeometry(q->geometry());
|
||||
|
Loading…
Reference in New Issue
Block a user