=== modified file 'plugins/rotate/src/rotate.cpp' --- plugins/rotate/src/rotate.cpp 2013-05-21 14:13:15 +0000 +++ plugins/rotate/src/rotate.cpp 2013-07-17 07:15:03 +0000 @@ -800,6 +800,17 @@ break; + case FocusIn: + case FocusOut: + /* Edges on when grabbed */ + if (!optionGetEdgeFlipPointer ()) + { + if (event->xfocus.mode == NotifyGrab) + toggleEdges (true); + else if (event->xfocus.mode == NotifyUngrab) + toggleEdges (false); + } + case ClientMessage: if (event->xclient.message_type == Atoms::desktopViewport) { @@ -892,6 +903,23 @@ window->activate (); } +void +RotateScreen::toggleEdges (bool enabled) +{ + ROTATE_SCREEN (screen); + + if (!enabled) + { + screen->removeAction (&rs->optionGetRotateFlipLeftEdge ()); + screen->removeAction (&rs->optionGetRotateFlipRightEdge ()); + } + else + { + screen->addAction (&rs->optionGetRotateFlipLeftEdge ()); + screen->addAction (&rs->optionGetRotateFlipRightEdge ()); + } +} + void RotateWindow::grabNotify (int x, int y, === modified file 'plugins/rotate/src/rotate.h' --- plugins/rotate/src/rotate.h 2013-05-19 13:44:51 +0000 +++ plugins/rotate/src/rotate.h 2013-07-17 07:12:41 +0000 @@ -106,6 +106,8 @@ int rotateToDirection (int face); + void toggleEdges (bool); + bool rotateTo (CompAction *action, CompAction::State state, CompOption::Vector &options,