MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / performModifierWindowMouseAction

Function performModifierWindowMouseAction

src/input.cpp:807–825  ·  view source on GitHub ↗

* @returns if a command was performed, whether or not the event should be filtered out * if no command was performed, std::nullopt */

Source from the content-addressed store, hash-verified

805 * if no command was performed, std::nullopt
806 */
807std::optional<bool> performModifierWindowMouseAction(PointerButtonEvent *event, Window *window)
808{
809 if (event->modifiersRelevantForShortcuts != options->commandAllModifier()) {
810 return std::nullopt;
811 }
812 if (input()->pointer()->isConstrained() || workspace()->globalShortcutsDisabled()) {
813 return std::nullopt;
814 }
815 switch (event->button) {
816 case Qt::LeftButton:
817 return !window->performMousePressCommand(options->commandAll1(), event->position);
818 case Qt::MiddleButton:
819 return !window->performMousePressCommand(options->commandAll2(), event->position);
820 case Qt::RightButton:
821 return !window->performMousePressCommand(options->commandAll3(), event->position);
822 default:
823 return std::nullopt;
824 }
825}
826/**
827 * @returns if a command was performed, whether or not the event should be filtered out
828 * if no command was performed, std::nullopt

Callers 2

performWindowMouseActionFunction · 0.85
pointerButtonMethod · 0.85

Calls 4

inputFunction · 0.85
workspaceFunction · 0.85

Tested by

no test coverage detected