Changeset View
Changeset View
Standalone View
Standalone View
useractions.cpp
Show First 20 Lines • Show All 1127 Lines • ▼ Show 20 Line(s) | 1127 | case Options::LowerOp: | |||
---|---|---|---|---|---|
1128 | lowerClient(c); | 1128 | lowerClient(c); | ||
1129 | break; | 1129 | break; | ||
1130 | case Options::NoOp: | 1130 | case Options::NoOp: | ||
1131 | break; | 1131 | break; | ||
1132 | } | 1132 | } | ||
1133 | } | 1133 | } | ||
1134 | 1134 | | |||
1135 | /** | 1135 | /** | ||
1136 | * Called by the decoration in the new API to determine what buttons the user has configured for | | |||
1137 | * window tab dragging and the operations menu. | | |||
1138 | */ | | |||
1139 | Options::WindowOperation X11Client::mouseButtonToWindowOperation(Qt::MouseButtons button) | | |||
1140 | { | | |||
1141 | Options::MouseCommand com = Options::MouseNothing; | | |||
1142 | bool active = isActive(); | | |||
1143 | if (!wantsInput()) // we cannot be active, use it anyway | | |||
1144 | active = true; | | |||
1145 | | ||||
1146 | if (button == Qt::LeftButton) | | |||
1147 | com = active ? options->commandActiveTitlebar1() : options->commandInactiveTitlebar1(); | | |||
1148 | else if (button == Qt::MidButton) | | |||
1149 | com = active ? options->commandActiveTitlebar2() : options->commandInactiveTitlebar2(); | | |||
1150 | else if (button == Qt::RightButton) | | |||
1151 | com = active ? options->commandActiveTitlebar3() : options->commandInactiveTitlebar3(); | | |||
1152 | | ||||
1153 | if (com == Options::MouseOperationsMenu) | | |||
1154 | return Options::OperationsOp; | | |||
1155 | return Options::NoOp; | | |||
1156 | } | | |||
1157 | | ||||
1158 | /** | | |||
1159 | * Performs a mouse command on this client (see options.h) | 1136 | * Performs a mouse command on this client (see options.h) | ||
1160 | */ | 1137 | */ | ||
1161 | bool X11Client::performMouseCommand(Options::MouseCommand command, const QPoint &globalPos) | 1138 | bool X11Client::performMouseCommand(Options::MouseCommand command, const QPoint &globalPos) | ||
1162 | { | 1139 | { | ||
1163 | bool replay = false; | 1140 | bool replay = false; | ||
1164 | switch(command) { | 1141 | switch(command) { | ||
1165 | case Options::MouseShade : | 1142 | case Options::MouseShade : | ||
1166 | toggleShade(); | 1143 | toggleShade(); | ||
▲ Show 20 Lines • Show All 579 Lines • Show Last 20 Lines |