diff --git a/DSView/pv/ui/xtoolbutton.cpp b/DSView/pv/ui/xtoolbutton.cpp index ab82f6b3..dd1eacdb 100644 --- a/DSView/pv/ui/xtoolbutton.cpp +++ b/DSView/pv/ui/xtoolbutton.cpp @@ -22,10 +22,11 @@ #include "xtoolbutton.h" #include #include +#include #include "../log.h" #ifdef _WIN32 -#include "winnativewidget.h" +#include "../winnativewidget.h" #endif namespace @@ -99,9 +100,7 @@ void XToolButton::onHidePopupMenu() setCheckable(true); setChecked(false); setCheckable(false); - - pv::WinNativeWidget::EnalbeNoClientArea(true); - + QWidget *widgetUnderMouse = qApp->widgetAt(QCursor::pos()); if (widgetUnderMouse != this){ _is_mouse_down = false; @@ -115,5 +114,9 @@ void XToolButton::onHidePopupMenu() disconnect(_menu, SIGNAL(aboutToHide()), this, SLOT(onHidePopupMenu())); } + QTimer::singleShot(300, this, [this](){ + pv::WinNativeWidget::EnalbeNoClientArea(true); + }); + #endif }