Pass also the currently active window in the _NET_ACTIVE_WINDOW message.
svn path=/trunk/kdebase/kwin/; revision=273668
This commit is contained in:
parent
0fcb47d23d
commit
c84b674e6a
2 changed files with 8 additions and 2 deletions
|
@ -103,7 +103,7 @@ void RootInfo::changeCurrentDesktop(int d)
|
|||
workspace->setCurrentDesktop( d );
|
||||
}
|
||||
|
||||
void RootInfo::changeActiveWindow( Window w, NET::RequestSource src, Time timestamp )
|
||||
void RootInfo::changeActiveWindow( Window w, NET::RequestSource src, Time timestamp, Window active_window )
|
||||
{
|
||||
if( Client* c = workspace->findClient( WindowMatchPredicate( w )))
|
||||
{
|
||||
|
@ -113,8 +113,14 @@ void RootInfo::changeActiveWindow( Window w, NET::RequestSource src, Time timest
|
|||
workspace->activateClient( c );
|
||||
else // NET::FromApplication
|
||||
{
|
||||
Client* c2;
|
||||
if( workspace->allowClientActivation( c, timestamp ))
|
||||
workspace->activateClient( c );
|
||||
// if activation of the requestor's window would be allowed, allow activation too
|
||||
else if( active_window != None
|
||||
&& ( c2 = workspace->findClient( WindowMatchPredicate( active_window ))) != NULL
|
||||
&& workspace->allowClientActivation( c2, timestamp ))
|
||||
workspace->activateClient( c );
|
||||
else
|
||||
c->demandAttention();
|
||||
}
|
||||
|
|
|
@ -539,7 +539,7 @@ class RootInfo : public NETRootInfo2
|
|||
virtual void changeNumberOfDesktops(int n);
|
||||
virtual void changeCurrentDesktop(int d);
|
||||
// virtual void changeActiveWindow(Window w); the extended version is used
|
||||
virtual void changeActiveWindow(Window w,NET::RequestSource src, Time timestamp);
|
||||
virtual void changeActiveWindow(Window w,NET::RequestSource src, Time timestamp, Window active_window);
|
||||
virtual void closeWindow(Window w);
|
||||
virtual void moveResize(Window w, int x_root, int y_root, unsigned long direction);
|
||||
virtual void moveResizeWindow(Window w, int flags, int x, int y, int width, int height );
|
||||
|
|
Loading…
Reference in a new issue