diff --git a/client.h b/client.h index d21b42430e..5924357bb1 100644 --- a/client.h +++ b/client.h @@ -133,6 +133,8 @@ public: void move( const QPoint & p ) { move( p.x(), p.y() ); } + + virtual bool wantsTabFocus() const { return TRUE;} //### just for now public slots: @@ -311,6 +313,8 @@ class NoBorderClient : public Client public: NoBorderClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 ); ~NoBorderClient(); + + bool wantsTabFocus() const { return FALSE;} //### just for now }; #endif diff --git a/workspace.cpp b/workspace.cpp index 3d842df193..36d2fe0769 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -169,7 +169,8 @@ void Workspace::init() clients.append( c ); stacking_order.append( c ); } - focus_chain.append( c ); + if ( c->wantsTabFocus() ) + focus_chain.append( c ); c->manage( TRUE ); if ( c == desktop_client ) setDesktopClient( c ); @@ -207,6 +208,7 @@ Workspace::~Workspace() XDeleteProperty(qt_xdisplay(), qt_xrootwin(), atoms->kwm_running); } + /*! Handles workspace specific XEvents */ @@ -274,7 +276,8 @@ bool Workspace::workspaceEvent( XEvent * e ) XReparentWindow( qt_xdisplay(), c->winId(), root, 0, 0 ); } if ( c != desktop_client ) { - focus_chain.prepend( c ); + if ( c->wantsTabFocus() ) + focus_chain.prepend( c ); clients.append( c ); stacking_order.append( c ); } @@ -703,7 +706,8 @@ void Workspace::setActiveClient( Client* c ) active_client = c; if ( active_client ) { focus_chain.remove( c ); - focus_chain.append( c ); + if ( c->wantsTabFocus() ) + focus_chain.append( c ); } WId w = active_client? active_client->window() : 0; XChangeProperty(qt_xdisplay(), qt_xrootwin(),