Changeset View
Changeset View
Standalone View
Standalone View
input.cpp
Show First 20 Lines • Show All 957 Lines • ▼ Show 20 Line(s) | 957 | if (event->type() != QEvent::MouseButtonPress) { | |||
---|---|---|---|---|---|
958 | return false; | 958 | return false; | ||
959 | } | 959 | } | ||
960 | AbstractClient *c = dynamic_cast<AbstractClient*>(input()->pointer()->window().data()); | 960 | AbstractClient *c = dynamic_cast<AbstractClient*>(input()->pointer()->window().data()); | ||
961 | if (!c) { | 961 | if (!c) { | ||
962 | return false; | 962 | return false; | ||
963 | } | 963 | } | ||
964 | bool wasAction = false; | 964 | bool wasAction = false; | ||
965 | Options::MouseCommand command = Options::MouseNothing; | 965 | Options::MouseCommand command = Options::MouseNothing; | ||
966 | if (event->modifiers() == options->commandAllModifier()) { | 966 | if (input()->keyboard()->xkb()->modifiersRelevantForGlobalShortcuts() == options->commandAllModifier()) { | ||
967 | wasAction = true; | 967 | wasAction = true; | ||
968 | switch (event->button()) { | 968 | switch (event->button()) { | ||
969 | case Qt::LeftButton: | 969 | case Qt::LeftButton: | ||
970 | command = options->commandAll1(); | 970 | command = options->commandAll1(); | ||
971 | break; | 971 | break; | ||
972 | case Qt::MiddleButton: | 972 | case Qt::MiddleButton: | ||
973 | command = options->commandAll2(); | 973 | command = options->commandAll2(); | ||
974 | break; | 974 | break; | ||
Show All 18 Lines | 991 | if (event->angleDelta().y() == 0) { | |||
993 | return false; | 993 | return false; | ||
994 | } | 994 | } | ||
995 | AbstractClient *c = dynamic_cast<AbstractClient*>(input()->pointer()->window().data()); | 995 | AbstractClient *c = dynamic_cast<AbstractClient*>(input()->pointer()->window().data()); | ||
996 | if (!c) { | 996 | if (!c) { | ||
997 | return false; | 997 | return false; | ||
998 | } | 998 | } | ||
999 | bool wasAction = false; | 999 | bool wasAction = false; | ||
1000 | Options::MouseCommand command = Options::MouseNothing; | 1000 | Options::MouseCommand command = Options::MouseNothing; | ||
1001 | if (event->modifiers() == options->commandAllModifier()) { | 1001 | if (input()->keyboard()->xkb()->modifiersRelevantForGlobalShortcuts() == options->commandAllModifier()) { | ||
1002 | wasAction = true; | 1002 | wasAction = true; | ||
1003 | command = options->operationWindowMouseWheel(-1 * event->angleDelta().y()); | 1003 | command = options->operationWindowMouseWheel(-1 * event->angleDelta().y()); | ||
1004 | } else { | 1004 | } else { | ||
1005 | command = c->getWheelCommand(Qt::Vertical, &wasAction); | 1005 | command = c->getWheelCommand(Qt::Vertical, &wasAction); | ||
1006 | } | 1006 | } | ||
1007 | if (wasAction) { | 1007 | if (wasAction) { | ||
1008 | return !c->performMouseCommand(command, event->globalPos()); | 1008 | return !c->performMouseCommand(command, event->globalPos()); | ||
1009 | } | 1009 | } | ||
▲ Show 20 Lines • Show All 866 Lines • Show Last 20 Lines |