Summary: | Click raise active window doesn't raise the active window | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Joseph Smith <alienfeet2000> |
Component: | compositing | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, ovit.debian, sgrayban |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Joseph Smith
2006-06-05 03:11:00 UTC
It looks like this may be related to the Xorg server version and not the KDE version, but it still may be a bug in kwin. My system upgraded the Xorg server while KDE was updated to 3.5.3. I don't have KDE 3.5.2 installed anymore, so I can't say if the newer Xorg modules will produce the same problem with that version of kwin. In any case, there appears to be an incompatibility between KDE 3.5.3 and Xorg 7.1. I've listed Xorg modules that were updated with KDE. The problem is not apparent with the following Xorg modules: xorg-server-1.0.2 xf86-input-mouse-1.0.4 xf86-input-keyboard-1.0.1.3 xf86-video-ati-6.5.8.0 xorg-x11-7.0 The upgraded versions are: xorg-server-1.1.0 xf86-video-vesa-1.2.0 xf86-video-ati-6.6.0 xf86-input-mouse-1.1.1 xf86-input-keyboard-1.1.0 xorg-x11-7.1 These are Gentoo module versions, but I think they correspond to the Xorg module versions. Works fine with KDE 3.5.3 and XOrg 6.9.0. I'm afraid it'll take some time before I'll have some system with 7.1 handy. It appears that this problem may be more directly related to using kompmgr. The problem seems to only appear with Xorg 7.1 when kompmgr is running. I have this problem too under xorg 7.1 -- and indeed only when kompmgr is running. I am using KDE 3.5.5. I have seen this problem on Kubuntu (dapper) with X.org 7.0.0. I find it to be unrelated to any 'delay focus' setting. I should have mentioned, I have KDE 3.5.2 installed as well. I have the same problem under XOrg 7.1.1, but only when running kompmgr. I am using KDE 3.5.5. SVN commit 603293 by lunakl: 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. BUG: 128648 M +0 -1 client.cpp M +0 -2 client.h M +3 -22 events.cpp M +4 -0 layers.cpp M +1 -2 manage.cpp M +1 -2 workspace.cpp --- branches/KDE/3.5/kdebase/kwin/client.cpp #603292:603293 @@ -128,7 +128,6 @@ modal = false; noborder = false; user_noborder = false; - not_obscured = false; urgency = false; ignore_focus_stealing = false; demands_attention = false; --- branches/KDE/3.5/kdebase/kwin/client.h #603292:603293 @@ -336,7 +336,6 @@ void clientMessageEvent( XClientMessageEvent* e ); void enterNotifyEvent( XCrossingEvent* e ); void leaveNotifyEvent( XCrossingEvent* e ); - void visibilityNotifyEvent( XVisibilityEvent* e ); void focusInEvent( XFocusInEvent* e ); void focusOutEvent( XFocusOutEvent* e ); @@ -485,7 +484,6 @@ 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; --- branches/KDE/3.5/kdebase/kwin/events.cpp #603292:603293 @@ -631,9 +631,6 @@ workspace()->updateColormap(); } break; - case VisibilityNotify: - visibilityNotifyEvent( &e->xvisibility ); - break; default: if( e->xany.window == window()) { @@ -1009,18 +1006,13 @@ */ void Client::updateMouseGrab() { - if( workspace()->globalShortcutsDisabled()) - { - XUngrabButton( qt_xdisplay(), 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 @@ -1455,17 +1447,6 @@ 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 ) { --- branches/KDE/3.5/kdebase/kwin/layers.cpp #603292:603293 @@ -117,7 +117,11 @@ } #endif if( changed || propagate_new_clients ) + { propagateClients( propagate_new_clients ); + if( active_client ) + active_client->updateMouseGrab(); + } } /*! --- branches/KDE/3.5/kdebase/kwin/manage.cpp #603292:603293 @@ -565,8 +565,7 @@ FocusChangeMask | ExposureMask | PropertyChangeMask | - StructureNotifyMask | SubstructureRedirectMask | - VisibilityChangeMask ); + StructureNotifyMask | SubstructureRedirectMask ); XSelectInput( qt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); XSelectInput( qt_xdisplay(), client, FocusChangeMask | --- branches/KDE/3.5/kdebase/kwin/workspace.cpp #603292:603293 @@ -2022,8 +2022,7 @@ XSetWindowAttributes attributes; unsigned long valuemask; attributes.override_redirect = True; - attributes.event_mask = (EnterWindowMask | LeaveWindowMask | - VisibilityChangeMask); + attributes.event_mask = ( EnterWindowMask | LeaveWindowMask ); valuemask= (CWOverrideRedirect | CWEventMask | CWCursor ); attributes.cursor = XCreateFontCursor(qt_xdisplay(), XC_sb_up_arrow); *** Bug 138875 has been marked as a duplicate of this bug. *** *** Bug 145902 has been marked as a duplicate of this bug. *** This patch has also broken Superkaramba -- have months of testing and working out what was changed we found that this fix has broken superkaramba. See bug #143255 |