diff --git a/CMakeLists.txt b/CMakeLists.txt index e93555b..c0b64b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,7 @@ else() else() target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::X11Extras + X11 ) endif() endif() diff --git a/framelesshelper.cpp b/framelesshelper.cpp index 8f8463f..7fa9416 100644 --- a/framelesshelper.cpp +++ b/framelesshelper.cpp @@ -508,16 +508,13 @@ bool FramelessHelper::eventFilter(QObject *object, QEvent *event) startMove(ev->globalPos()); ev->accept(); filterOut = true; - } else if (isClickResizeHandler() && isHoverResizeHandler()) { + } else if (isClickResizeHandler()) { // Start system resize - startResize(ev->globalPos(), m_hoveredFrameSection); - ev->accept(); - filterOut = true; - } - - // This case takes into account that the mouse moves outside the window boundary - QRect windowRect(0, 0, windowSize().width(), windowSize().height()); - if (isClickResizeHandler() && !windowRect.contains(ev->pos())) { + // + // When mouse moves outside resize handler, m_hoveredFrameSection will be + // set to Qt::NoSection , so we use m_clickedFrameSection instead. This + // case also takes into account that the mouse moves outside the window + // boundary. startResize(ev->globalPos(), m_clickedFrameSection); ev->accept(); filterOut = true;