| 492 | } |
| 493 | |
| 494 | void EffectsHandler::startMouseInterception(Effect *effect, Qt::CursorShape shape) |
| 495 | { |
| 496 | if (m_grabbedMouseEffects.contains(effect)) { |
| 497 | return; |
| 498 | } |
| 499 | m_grabbedMouseEffects.append(effect); |
| 500 | if (m_grabbedMouseEffects.size() != 1) { |
| 501 | return; |
| 502 | } |
| 503 | |
| 504 | input()->pointer()->setEffectsOverrideCursor(shape); |
| 505 | |
| 506 | // We want to allow global shortcuts to be triggered when moving a |
| 507 | // window so it is possible to pick up a window and then move it to a |
| 508 | // different desktop by using the global shortcut to switch desktop. |
| 509 | // However, that means that some other things can also be triggered. If |
| 510 | // an effect that fill the screen gets triggered that way, we end up in a |
| 511 | // weird state where the move will restart after the effect closes. So to |
| 512 | // avoid that, abort move/resize if a full screen effect starts. |
| 513 | if (workspace()->moveResizeWindow()) { |
| 514 | workspace()->moveResizeWindow()->endInteractiveMoveResize(); |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | void EffectsHandler::stopMouseInterception(Effect *effect) |
| 519 | { |
no test coverage detected