From 2d59aac1c8df979a330471bbcaf5481e8efd873b Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Thu, 26 Oct 2000 08:26:05 +0000 Subject: [PATCH] small fix for mac menu when using focus follows mouse (even though this combination does not make sense at all) svn path=/trunk/kdebase/kwin/; revision=68919 --- client.cpp | 4 +++- workspace.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client.cpp b/client.cpp index 2c341e9253..cc25bcb839 100644 --- a/client.cpp +++ b/client.cpp @@ -77,7 +77,7 @@ public: m_client->maximize( Client::MaximizeRestore ); } - if ( state & NET::StaysOnTop ) { + if ( ( mask & NET::StaysOnTop) != 0 && (state & NET::StaysOnTop) != 0 ) { m_client->setStaysOnTop( state & NET::StaysOnTop ); m_client->workspace()->raiseClient( m_client ); } @@ -1049,6 +1049,8 @@ bool Client::configureRequest( XConfigureRequestEvent& e ) switch (stack_mode){ case Above: case TopIf: + if ( isMenu() && mainClient() != this ) + break; // in this case, we already do the raise workspace()->raiseClient( this ); break; case Below: diff --git a/workspace.cpp b/workspace.cpp index b68579b2eb..75972a08ca 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -955,7 +955,7 @@ void Workspace::setActiveClient( Client* c ) if ( menubar ) { menubar->show(); - raiseClient( menubar ); + menubar->raise(); // better for FocusFollowsMouse than raiseClient(menubar) } // ... then hide the other ones. Avoids flickers. @@ -1002,7 +1002,7 @@ void Workspace::iconifyOrDeiconifyTransientsOf( Client* c ) for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { if ( (*it)->transientFor() == c->window() && !(*it)->isIconified() - && !(*it)->isShade() + && !(*it)->isShade() && ( !exclude_menu || !(*it)->isMenu() ) ) { (*it)->setMappingState( XIconicState ); (*it)->hide();