diff --git a/src/controllers/FloatingWindow.cpp b/src/controllers/FloatingWindow.cpp index 34029986..45ea437a 100644 --- a/src/controllers/FloatingWindow.cpp +++ b/src/controllers/FloatingWindow.cpp @@ -33,6 +33,13 @@ #include #include +#ifdef Q_OS_WIN +#define NOMINMAX +#include +#endif + +#include + using namespace KDDockWidgets; using namespace KDDockWidgets::Controllers; @@ -335,7 +342,7 @@ Layout *FloatingWindow::layout() const bool FloatingWindow::isInDragArea(QPoint globalPoint) const { -#ifdef Q_OS_WIN_TODO +#ifdef Q_OS_WIN // A click near the border will still send a Qt::NonClientMousePressEvent. We shouldn't // interpret that as a drag, as it's for a native resize. // Keep track of how we handled the WM_NCHITTEST diff --git a/src/controllers/FloatingWindow.h b/src/controllers/FloatingWindow.h index 206093b9..032afd1c 100644 --- a/src/controllers/FloatingWindow.h +++ b/src/controllers/FloatingWindow.h @@ -58,7 +58,7 @@ public: static void ensureRectIsOnScreen(QRect &geometry); -#ifdef Q_OS_WIN_TODO +#ifdef Q_OS_WIN void setLastHitTest(int hitTest) { m_lastHitTest = hitTest; @@ -242,7 +242,7 @@ private: KDBindings::ScopedConnection m_visibleWidgetCountConnection; QAbstractNativeEventFilter *m_nchittestFilter = nullptr; Qt::WindowState windowStateOverride() const; -#ifdef Q_OS_WIN_TODO +#ifdef Q_OS_WIN int m_lastHitTest = 0; #endif };