mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
enable the NCCLIENT after closed a popup tool menu by timer
This commit is contained in:
parent
695d84961c
commit
c063974900
@ -22,10 +22,11 @@
|
||||
#include "xtoolbutton.h"
|
||||
#include <QMenu>
|
||||
#include <QApplication>
|
||||
#include <QTimer>
|
||||
#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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user