Merging from old trunk:

r603295 | lunakl | 2006-11-08 14:59:27 +0100 (Wed, 08 Nov 2006) | 6 lines

Ok, with a compositing manager running, VisibilityNotify no longer
considers windows not visible just because a window is above them,
so the code from r198017 no longer works.
(#128648)


svn path=/trunk/KDE/kdebase/workspace/; revision=659308
This commit is contained in:
Luboš Luňák 2007-04-29 22:37:19 +00:00
parent bdabd3c2ee
commit b9ce4b2954
4 changed files with 5 additions and 25 deletions

View file

@ -125,7 +125,6 @@ Client::Client( Workspace *ws )
modal = false;
noborder = false;
user_noborder = false;
not_obscured = false;
urgency = false;
ignore_focus_stealing = false;
demands_attention = false;

View file

@ -287,7 +287,6 @@ class Client
void clientMessageEvent( XClientMessageEvent* e );
void enterNotifyEvent( XCrossingEvent* e );
void leaveNotifyEvent( XCrossingEvent* e );
void visibilityNotifyEvent( XVisibilityEvent* e );
void focusInEvent( XFocusInEvent* e );
void focusOutEvent( XFocusOutEvent* e );
@ -423,7 +422,6 @@ class Client
uint modal : 1; // NET::Modal
uint noborder : 1;
uint user_noborder : 1;
uint not_obscured : 1;
uint urgency : 1; // XWMHints, UrgencyHint
uint ignore_focus_stealing : 1; // don't apply focus stealing prevention to this client
uint demands_attention : 1;

View file

@ -704,9 +704,6 @@ bool Client::windowEvent( XEvent* e )
workspace()->updateColormap();
}
break;
case VisibilityNotify:
visibilityNotifyEvent( &e->xvisibility );
break;
default:
if( e->xany.window == window())
{
@ -1084,18 +1081,13 @@ void Client::ungrabButton( int modifier )
*/
void Client::updateMouseGrab()
{
if( workspace()->globalShortcutsDisabled())
{
XUngrabButton( display(), AnyButton, AnyModifier, wrapperId());
// keep grab for the simple click without modifiers if needed
if( !( !options->clickRaise || not_obscured ))
grabButton( None );
return;
}
if( isActive() && !workspace()->forcedGlobalMouseGrab()) // see Workspace::establishTabBoxGrab()
{
// remove the grab for no modifiers only if the window
// is unobscured or if the user doesn't want click raise
// (it is unobscured if it the topmost in the unconstrained stacking order, i.e. it is
// the most recently raised window)
bool not_obscured = workspace()->topClientOnDesktop( workspace()->currentDesktop(), true ) == this;
if( !options->clickRaise || not_obscured )
ungrabButton( None );
else
@ -1508,17 +1500,6 @@ void Client::focusOutEvent( XFocusOutEvent* e )
setActive( false );
}
void Client::visibilityNotifyEvent( XVisibilityEvent * e)
{
if( e->window != frameId())
return; // care only about the whole frame
bool new_not_obscured = e->state == VisibilityUnobscured;
if( not_obscured == new_not_obscured )
return;
not_obscured = new_not_obscured;
updateMouseGrab();
}
// performs _NET_WM_MOVERESIZE
void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction )
{

View file

@ -120,6 +120,8 @@ void Workspace::updateStackingOrder( bool propagate_new_clients )
{
propagateClients( propagate_new_clients );
addRepaintFull();
if( active_client )
active_client->updateMouseGrab();
}
}