diff --git a/client.cpp b/client.cpp index 17f6bdcedc..45ceec8273 100644 --- a/client.cpp +++ b/client.cpp @@ -471,7 +471,7 @@ Client::~Client() { releaseWindow(); if (workspace()->activeClient() == this) - workspace()->setEnableFocusChange(true); // Safety + workspace()->setFocusChangeEnabled(true); // Safety delete info; } @@ -1080,7 +1080,7 @@ void Client::mouseReleaseEvent( QMouseEvent * e) setGeometry( geom ); Events::raise( isResize() ? Events::ResizeEnd : Events::MoveEnd ); moveResizeMode = FALSE; - workspace()->setEnableFocusChange(true); + workspace()->setFocusChangeEnabled(true); releaseMouse(); releaseKeyboard(); } @@ -1115,7 +1115,7 @@ void Client::mouseMoveEvent( QMouseEvent * e) QPoint p( e->pos() - moveOffset ); if (p.manhattanLength() >= 6) { moveResizeMode = TRUE; - workspace()->setEnableFocusChange(false); + workspace()->setFocusChangeEnabled(false); Events::raise( isResize() ? Events::ResizeStart : Events::MoveStart ); grabMouse( cursor() ); // to keep the right cursor if ( ( isMove() && options->moveMode != Options::Opaque ) @@ -1601,7 +1601,7 @@ bool Client::x11Event( XEvent * e) if ( options->focusPolicy == Options::ClickToFocus ) return TRUE; - if ( options->autoRaise && !isDesktop() && !isDock() && !isMenu() ) { + if ( options->autoRaise && !isDesktop() && !isDock() && !isMenu() && workspace()->focusChangeEnabled() ) { delete autoRaiseTimer; autoRaiseTimer = new QTimer( this ); connect( autoRaiseTimer, SIGNAL( timeout() ), this, SLOT( autoRaise() ) ); @@ -1991,7 +1991,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo break; mode = Center; moveResizeMode = TRUE; - workspace()->setEnableFocusChange(false); + workspace()->setFocusChangeEnabled(false); buttonDown = TRUE; moveOffset = mapFromGlobal( globalPos ); invertedMoveOffset = rect().bottomRight() - moveOffset; @@ -2004,7 +2004,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, QPoint globalPo if (!isMovable()) break; moveResizeMode = TRUE; - workspace()->setEnableFocusChange(false); + workspace()->setFocusChangeEnabled(false); buttonDown = TRUE; moveOffset = mapFromGlobal( globalPos ); int x = moveOffset.x(), y = moveOffset.y(); @@ -2138,7 +2138,7 @@ void Client::keyPressEvent( QKeyEvent * e ) XUngrabServer( qt_xdisplay() ); setGeometry( geom ); moveResizeMode = FALSE; - workspace()->setEnableFocusChange(true); + workspace()->setFocusChangeEnabled(true); releaseMouse(); releaseKeyboard(); buttonDown = FALSE; diff --git a/workspace.h b/workspace.h index fa3d98026c..64859c2da1 100644 --- a/workspace.h +++ b/workspace.h @@ -110,7 +110,7 @@ public: void activateClient( Client* ); void requestFocus( Client* c); - void setEnableFocusChange(bool b) { focus_change = b; } + void setFocusChangeEnabled(bool b) { focus_change = b; } bool focusChangeEnabled() { return focus_change; } void doPlacement( Client* c ); @@ -139,7 +139,7 @@ public: Client* previousClient(Client*) const; Client* nextStaticClient(Client*) const; Client* previousStaticClient(Client*) const; - + /** * Returns the list of clients sorted in stacking order, with topmost client * at the last position @@ -225,7 +225,7 @@ private: void init(); void createKeybindings(); void freeKeyboard(bool pass); - + ClientList constrainedStackingOrder( const ClientList& list ); Client* clientFactory(WId w);