Compare commits

...

1 Commits

Author SHA1 Message Date
Sergio Martins
30ad985703 Trying to fix the windows build 2021-02-15 10:42:27 -08:00
2 changed files with 3 additions and 4 deletions

View File

@@ -140,7 +140,6 @@ FloatingWindow::~FloatingWindow()
{ {
m_inDtor = true; m_inDtor = true;
disconnect(m_layoutDestroyedConnection); disconnect(m_layoutDestroyedConnection);
delete m_nchittestFilter;
DockRegistry::self()->unregisterFloatingWindow(this); DockRegistry::self()->unregisterFloatingWindow(this);
} }

View File

@@ -28,6 +28,7 @@
# include <QtGui/private/qhighdpiscaling_p.h> # include <QtGui/private/qhighdpiscaling_p.h>
# include <windowsx.h> # include <windowsx.h>
# include <windows.h> # include <windows.h>
# include <dwmapi.h>
# if defined(Q_CC_MSVC) # if defined(Q_CC_MSVC)
# pragma comment(lib,"User32.lib") # pragma comment(lib,"User32.lib")
# endif # endif
@@ -497,11 +498,10 @@ void WidgetResizeHandler::setupWindow(QWindow *window)
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
if (KDDockWidgets::usesAeroSnapWithCustomDecos()) { if (KDDockWidgets::usesAeroSnapWithCustomDecos()) {
#ifdef KDDOCKWIDGETS_QTWIDGETS #ifdef KDDOCKWIDGETS_QTWIDGETS
m_nchittestFilter = new NCHITTESTEventFilter(this); qApp->installNativeEventFilter(new NCHITTESTEventFilter(window));
qApp->installNativeEventFilter(m_nchittestFilter);
#endif #endif
const auto wid = HWND(window->winId()); const auto wid = HWND(window->winId());
connect(window, &QWindow::screenChanged, this, [this] { connect(window, &QWindow::screenChanged, window, [window, wid] {
// Qt honors our frame hijacking usually... but when screen changes we must give it a // Qt honors our frame hijacking usually... but when screen changes we must give it a
// nudge. Otherwise what Qt thinks is the client area is not what Windows knows it is. // nudge. Otherwise what Qt thinks is the client area is not what Windows knows it is.
// SetWindowPos() will trigger an NCCALCSIZE message, which Qt will intercept and take // SetWindowPos() will trigger an NCCALCSIZE message, which Qt will intercept and take