Port away from deprecated Qt::MidButton
parent
afdd5b84c7
commit
87ff6e4b44
|
@ -2380,7 +2380,7 @@ bool AbstractClient::processDecorationButtonPress(QMouseEvent *event, bool ignor
|
|||
|
||||
if (event->button() == Qt::LeftButton)
|
||||
com = active ? options->commandActiveTitlebar1() : options->commandInactiveTitlebar1();
|
||||
else if (event->button() == Qt::MidButton)
|
||||
else if (event->button() == Qt::MiddleButton)
|
||||
com = active ? options->commandActiveTitlebar2() : options->commandInactiveTitlebar2();
|
||||
else if (event->button() == Qt::RightButton)
|
||||
com = active ? options->commandActiveTitlebar3() : options->commandInactiveTitlebar3();
|
||||
|
|
|
@ -851,7 +851,7 @@ void CoverSwitchEffect::windowInputMouseEvent(QEvent* e)
|
|||
break;
|
||||
case Qt::LeftButton:
|
||||
case Qt::RightButton:
|
||||
case Qt::MidButton:
|
||||
case Qt::MiddleButton:
|
||||
default:
|
||||
QPoint pos = event->pos();
|
||||
|
||||
|
|
|
@ -576,7 +576,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
|
|||
windowMove = w;
|
||||
effects->setElevatedWindow(windowMove, true);
|
||||
}
|
||||
} else if ((me->buttons() == Qt::MidButton || me->buttons() == Qt::RightButton) && windowMove == nullptr) {
|
||||
} else if ((me->buttons() == Qt::MiddleButton || me->buttons() == Qt::RightButton) && windowMove == nullptr) {
|
||||
EffectWindow* w = windowAt(me->pos());
|
||||
if (w && w->isDesktop()) {
|
||||
w = nullptr;
|
||||
|
|
|
@ -953,7 +953,7 @@ void FlipSwitchEffect::windowInputMouseEvent(QEvent* e)
|
|||
break;
|
||||
case Qt::LeftButton:
|
||||
case Qt::RightButton:
|
||||
case Qt::MidButton:
|
||||
case Qt::MiddleButton:
|
||||
default:
|
||||
// TODO: Change window on mouse button click
|
||||
break;
|
||||
|
|
|
@ -602,7 +602,7 @@ void PresentWindowsEffect::inputEventUpdate(const QPoint &pos, QEvent::Type type
|
|||
mouseActionDesktop(m_leftButtonDesktop);
|
||||
}
|
||||
}
|
||||
if (button == Qt::MidButton) {
|
||||
if (button == Qt::MiddleButton) {
|
||||
if (hovering) {
|
||||
// mouse is hovering above a window - use MouseActionsWindow
|
||||
mouseActionWindow(m_middleButtonWindow);
|
||||
|
|
|
@ -1064,7 +1064,7 @@ double Options::animationTimeFactor() const
|
|||
Options::WindowOperation Options::operationMaxButtonClick(Qt::MouseButtons button) const
|
||||
{
|
||||
return button == Qt::RightButton ? opMaxButtonRightClick :
|
||||
button == Qt::MidButton ? opMaxButtonMiddleClick :
|
||||
button == Qt::MiddleButton ? opMaxButtonMiddleClick :
|
||||
opMaxButtonLeftClick;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ Qt::MouseButton x11ToQtMouseButton(int button)
|
|||
if (button == XCB_BUTTON_INDEX_1)
|
||||
return Qt::LeftButton;
|
||||
if (button == XCB_BUTTON_INDEX_2)
|
||||
return Qt::MidButton;
|
||||
return Qt::MiddleButton;
|
||||
if (button == XCB_BUTTON_INDEX_3)
|
||||
return Qt::RightButton;
|
||||
if (button == XCB_BUTTON_INDEX_4)
|
||||
|
@ -165,7 +165,7 @@ Qt::MouseButtons x11ToQtMouseButtons(int state)
|
|||
if (state & XCB_KEY_BUT_MASK_BUTTON_1)
|
||||
ret |= Qt::LeftButton;
|
||||
if (state & XCB_KEY_BUT_MASK_BUTTON_2)
|
||||
ret |= Qt::MidButton;
|
||||
ret |= Qt::MiddleButton;
|
||||
if (state & XCB_KEY_BUT_MASK_BUTTON_3)
|
||||
ret |= Qt::RightButton;
|
||||
if (state & XCB_KEY_BUT_MASK_BUTTON_4)
|
||||
|
|
Loading…
Reference in New Issue