only allow left button to move or resize

This commit is contained in:
Altair Wei 2021-09-20 16:54:52 +08:00
parent 0964483b20
commit 5ab2024f54
1 changed files with 5 additions and 2 deletions

View File

@ -351,8 +351,11 @@ bool FramelessHelper::eventFilter(QObject *object, QEvent *event)
case QEvent::MouseButtonPress:
{
auto ev = static_cast<QMouseEvent *>(event);
m_clickedFrameSection = m_hoveredFrameSection;
if (isHoverResizeHandler()) {
if (ev->button() == Qt::LeftButton)
m_clickedFrameSection = m_hoveredFrameSection;
if (ev->button() == Qt::LeftButton && isHoverResizeHandler()) {
// Start system resize
startResize(ev, m_hoveredFrameSection);
filterOut = true;