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
11
client.cpp
11
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() );
|
||||
|
@ -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 );
|
||||
|
|
2
client.h
2
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;
|
||||
|
|
|
@ -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,8 +109,8 @@ 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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue