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 );
|
info->setDesktop( desk );
|
||||||
|
|
||||||
if (isInitial)
|
if (isInitial) {
|
||||||
{
|
setMappingState( init_state );
|
||||||
setMappingState( init_state );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool showMe = (state == NormalState) && isOnDesktop( workspace()->currentDesktop() );
|
bool showMe = (state == NormalState) && isOnDesktop( workspace()->currentDesktop() );
|
||||||
|
@ -1861,7 +1860,7 @@ void Client::setShade( bool s )
|
||||||
{
|
{
|
||||||
if ( shaded == s )
|
if ( shaded == s )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( isVisible() )
|
if ( isVisible() )
|
||||||
Events::raise( s ? Events::ShadeDown : Events::ShadeUp );
|
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
|
Puts the focus on this window. Clients should never calls this
|
||||||
themselves, instead they should use Workspace::requestFocus().
|
themselves, instead they should use Workspace::requestFocus().
|
||||||
*/
|
*/
|
||||||
void Client::takeFocus()
|
void Client::takeFocus( bool force )
|
||||||
{
|
{
|
||||||
if ( isMenu() )
|
if ( !force && ( isMenu() || isDock() ) )
|
||||||
return; // menus don't take focus
|
return; // menus and dock windows don't take focus if not forced
|
||||||
|
|
||||||
if ( input )
|
if ( input )
|
||||||
XSetInputFocus( qt_xdisplay(), win, RevertToPointerRoot, kwin_time );
|
XSetInputFocus( qt_xdisplay(), win, RevertToPointerRoot, kwin_time );
|
||||||
|
|
4
client.h
4
client.h
|
@ -133,7 +133,7 @@ public:
|
||||||
|
|
||||||
bool isResizable() const;
|
bool isResizable() const;
|
||||||
|
|
||||||
void takeFocus();
|
void takeFocus( bool force = FALSE );
|
||||||
|
|
||||||
void setMask( const QRegion & );
|
void setMask( const QRegion & );
|
||||||
const QRegion& getMask() const;
|
const QRegion& getMask() const;
|
||||||
|
@ -227,7 +227,7 @@ protected:
|
||||||
bool configureRequest( XConfigureRequestEvent& e );
|
bool configureRequest( XConfigureRequestEvent& e );
|
||||||
bool propertyNotify( XPropertyEvent& e );
|
bool propertyNotify( XPropertyEvent& e );
|
||||||
bool clientMessage( XClientMessageEvent& e );
|
bool clientMessage( XClientMessageEvent& e );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSize sizeForWindowSize( const QSize&, bool ignore_height = FALSE ) const;
|
QSize sizeForWindowSize( const QSize&, bool ignore_height = FALSE ) const;
|
||||||
void getWmNormalHints();
|
void getWmNormalHints();
|
||||||
|
|
|
@ -974,7 +974,7 @@ void Workspace::setActiveClient( Client* c )
|
||||||
|
|
||||||
\sa setActiveClient(), requestFocus()
|
\sa setActiveClient(), requestFocus()
|
||||||
*/
|
*/
|
||||||
void Workspace::activateClient( Client* c)
|
void Workspace::activateClient( Client* c, bool force )
|
||||||
{
|
{
|
||||||
if (!c->isOnDesktop(currentDesktop()) ) {
|
if (!c->isOnDesktop(currentDesktop()) ) {
|
||||||
setCurrentDesktop( c->desktop() );
|
setCurrentDesktop( c->desktop() );
|
||||||
|
@ -985,7 +985,7 @@ void Workspace::activateClient( Client* c)
|
||||||
c->show();
|
c->show();
|
||||||
iconifyOrDeiconifyTransientsOf( c );
|
iconifyOrDeiconifyTransientsOf( c );
|
||||||
if ( options->focusPolicyIsReasonable() ) {
|
if ( options->focusPolicyIsReasonable() ) {
|
||||||
requestFocus( c );
|
requestFocus( c, force );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,7 +1044,7 @@ bool Workspace::hasCaption( const QString& caption )
|
||||||
|
|
||||||
\sa Workspace::activateClient()
|
\sa Workspace::activateClient()
|
||||||
*/
|
*/
|
||||||
void Workspace::requestFocus( Client* c)
|
void Workspace::requestFocus( Client* c, bool force )
|
||||||
{
|
{
|
||||||
if (!focusChangeEnabled())
|
if (!focusChangeEnabled())
|
||||||
return;
|
return;
|
||||||
|
@ -1059,7 +1059,7 @@ void Workspace::requestFocus( Client* c)
|
||||||
popup_client = c;
|
popup_client = c;
|
||||||
|
|
||||||
if ( c->isVisible() && !c->isShade() ) {
|
if ( c->isVisible() && !c->isShade() ) {
|
||||||
c->takeFocus();
|
c->takeFocus( force );
|
||||||
should_get_focus = c;
|
should_get_focus = c;
|
||||||
focus_chain.remove( c );
|
focus_chain.remove( c );
|
||||||
if ( c->wantsTabFocus() )
|
if ( c->wantsTabFocus() )
|
||||||
|
|
|
@ -109,9 +109,9 @@ public:
|
||||||
Client* activeClient() const;
|
Client* activeClient() const;
|
||||||
|
|
||||||
void setActiveClient( Client* );
|
void setActiveClient( Client* );
|
||||||
void activateClient( Client* );
|
void activateClient( Client*, bool force = FALSE );
|
||||||
void requestFocus( Client* c);
|
void requestFocus( Client* c, bool force = FALSE );
|
||||||
|
|
||||||
void updateColormap();
|
void updateColormap();
|
||||||
|
|
||||||
void setFocusChangeEnabled(bool b) { focus_change = b; }
|
void setFocusChangeEnabled(bool b) { focus_change = b; }
|
||||||
|
@ -329,7 +329,7 @@ private:
|
||||||
|
|
||||||
// swallowing
|
// swallowing
|
||||||
QStringList doNotManageList;
|
QStringList doNotManageList;
|
||||||
|
|
||||||
// colormap handling
|
// colormap handling
|
||||||
Colormap default_colormap;
|
Colormap default_colormap;
|
||||||
Colormap installed_colormap;
|
Colormap installed_colormap;
|
||||||
|
|
Loading…
Reference in a new issue