From d369e69db073429574cf09cedab48b494da0dc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 10 Nov 2003 18:50:38 +0000 Subject: [PATCH] KWin controls showing/hiding of topmenus, block requests for it. svn path=/trunk/kdebase/kwin/; revision=266171 --- events.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/events.cpp b/events.cpp index 9894394b31..d9d236a80b 100644 --- a/events.cpp +++ b/events.cpp @@ -581,6 +581,8 @@ void Client::mapRequestEvent( XMapRequestEvent* e ) { if( e->window != window()) return; // no messing with frame etc. + if( isTopMenu() && workspace()->managingTopMenus()) + return; // kwin controls these switch ( mappingState() ) { case WithdrawnState: @@ -633,10 +635,10 @@ void Client::unmapNotifyEvent( XUnmapEvent* e ) XEvent ev; if( XCheckTypedWindowEvent (qt_xdisplay(), window(), DestroyNotify, &ev) ) // TODO I don't like this much - { - destroyClient(); // deletes this - return; - } + { + destroyClient(); // deletes this + return; + } releaseWindow(); break; default: @@ -664,6 +666,8 @@ void Client::clientMessageEvent( XClientMessageEvent* e ) // WM_STATE if ( e->message_type == atoms->kde_wm_change_state ) { + if( isTopMenu() && workspace()->managingTopMenus()) + return; // kwin controls these if( e->data.l[ 1 ] ) blockAnimation = true; if( e->data.l[ 0 ] == IconicState ) @@ -686,6 +690,8 @@ void Client::clientMessageEvent( XClientMessageEvent* e ) } else if ( e->message_type == atoms->wm_change_state) { + if( isTopMenu() && workspace()->managingTopMenus()) + return; // kwin controls these if ( e->data.l[0] == IconicState ) minimize(); return;