don't activate dock windows with click (fixes kicker focus problems,
reviewed by Carsten Peiffer) svn path=/trunk/kdebase/kwin/; revision=63580
This commit is contained in:
parent
1add59200c
commit
10b2e5fde2
4 changed files with 16 additions and 17 deletions
13
client.cpp
13
client.cpp
|
@ -594,9 +594,8 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
|||
|
||||
info->setDesktop( desk );
|
||||
|
||||
if (isInitial)
|
||||
{
|
||||
setMappingState( init_state );
|
||||
if (isInitial) {
|
||||
setMappingState( init_state );
|
||||
}
|
||||
|
||||
bool showMe = (state == NormalState) && isOnDesktop( workspace()->currentDesktop() );
|
||||
|
@ -1861,7 +1860,7 @@ void Client::setShade( bool s )
|
|||
{
|
||||
if ( shaded == s )
|
||||
return;
|
||||
|
||||
|
||||
if ( isVisible() )
|
||||
Events::raise( s ? Events::ShadeDown : Events::ShadeUp );
|
||||
|
||||
|
@ -2032,10 +2031,10 @@ void Client::getWindowProtocols(){
|
|||
Puts the focus on this window. Clients should never calls this
|
||||
themselves, instead they should use Workspace::requestFocus().
|
||||
*/
|
||||
void Client::takeFocus()
|
||||
void Client::takeFocus( bool force )
|
||||
{
|
||||
if ( isMenu() )
|
||||
return; // menus don't take focus
|
||||
if ( !force && ( isMenu() || isDock() ) )
|
||||
return; // menus and dock windows don't take focus if not forced
|
||||
|
||||
if ( input )
|
||||
XSetInputFocus( qt_xdisplay(), win, RevertToPointerRoot, kwin_time );
|
||||
|
|
4
client.h
4
client.h
|
@ -133,7 +133,7 @@ public:
|
|||
|
||||
bool isResizable() const;
|
||||
|
||||
void takeFocus();
|
||||
void takeFocus( bool force = FALSE );
|
||||
|
||||
void setMask( const QRegion & );
|
||||
const QRegion& getMask() const;
|
||||
|
@ -227,7 +227,7 @@ protected:
|
|||
bool configureRequest( XConfigureRequestEvent& e );
|
||||
bool propertyNotify( XPropertyEvent& e );
|
||||
bool clientMessage( XClientMessageEvent& e );
|
||||
|
||||
|
||||
private:
|
||||
QSize sizeForWindowSize( const QSize&, bool ignore_height = FALSE ) const;
|
||||
void getWmNormalHints();
|
||||
|
|
|
@ -974,7 +974,7 @@ void Workspace::setActiveClient( Client* c )
|
|||
|
||||
\sa setActiveClient(), requestFocus()
|
||||
*/
|
||||
void Workspace::activateClient( Client* c)
|
||||
void Workspace::activateClient( Client* c, bool force )
|
||||
{
|
||||
if (!c->isOnDesktop(currentDesktop()) ) {
|
||||
setCurrentDesktop( c->desktop() );
|
||||
|
@ -985,7 +985,7 @@ void Workspace::activateClient( Client* c)
|
|||
c->show();
|
||||
iconifyOrDeiconifyTransientsOf( c );
|
||||
if ( options->focusPolicyIsReasonable() ) {
|
||||
requestFocus( c );
|
||||
requestFocus( c, force );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ bool Workspace::hasCaption( const QString& caption )
|
|||
|
||||
\sa Workspace::activateClient()
|
||||
*/
|
||||
void Workspace::requestFocus( Client* c)
|
||||
void Workspace::requestFocus( Client* c, bool force )
|
||||
{
|
||||
if (!focusChangeEnabled())
|
||||
return;
|
||||
|
@ -1059,7 +1059,7 @@ void Workspace::requestFocus( Client* c)
|
|||
popup_client = c;
|
||||
|
||||
if ( c->isVisible() && !c->isShade() ) {
|
||||
c->takeFocus();
|
||||
c->takeFocus( force );
|
||||
should_get_focus = c;
|
||||
focus_chain.remove( c );
|
||||
if ( c->wantsTabFocus() )
|
||||
|
|
|
@ -109,9 +109,9 @@ public:
|
|||
Client* activeClient() const;
|
||||
|
||||
void setActiveClient( Client* );
|
||||
void activateClient( Client* );
|
||||
void requestFocus( Client* c);
|
||||
|
||||
void activateClient( Client*, bool force = FALSE );
|
||||
void requestFocus( Client* c, bool force = FALSE );
|
||||
|
||||
void updateColormap();
|
||||
|
||||
void setFocusChangeEnabled(bool b) { focus_change = b; }
|
||||
|
@ -329,7 +329,7 @@ private:
|
|||
|
||||
// swallowing
|
||||
QStringList doNotManageList;
|
||||
|
||||
|
||||
// colormap handling
|
||||
Colormap default_colormap;
|
||||
Colormap installed_colormap;
|
||||
|
|
Loading…
Reference in a new issue