diff --git a/client.cpp b/client.cpp index 67c166a7ec..022c08fc09 100644 --- a/client.cpp +++ b/client.cpp @@ -346,7 +346,6 @@ void Client::detectNoBorder() case NET::Desktop : case NET::Dock : case NET::TopMenu : - case NET::Override : case NET::Splash : noborder = true; break; @@ -362,6 +361,11 @@ void Client::detectNoBorder() default: assert( false ); } + // NET::Override is some strange beast without clear definition, usually + // just meaning "noborder", so let's treat it only as such flag, and ignore it as + // a window type otherwise (SUPPORTED_WINDOW_TYPES_MASK doesn't include it) + if( info->windowType( SUPPORTED_WINDOW_TYPES_MASK | NET::OverrideMask ) == NET::Override ) + noborder = true; } void Client::updateFrameStrut() @@ -496,7 +500,7 @@ void Client::hideClient( bool hide ) */ bool Client::isMinimizable() const { - if( isSpecialWindow() && !isOverride()) + if( isSpecialWindow()) return false; if( isTransient()) { // #66868 - let other xmms windows be minimized when the mainwindow is minimized @@ -961,7 +965,7 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long */ bool Client::isCloseable() const { - return rules()->checkCloseable( motif_may_close && ( !isSpecialWindow() || isOverride())); // TODO is NET::Override special? + return rules()->checkCloseable( motif_may_close && !isSpecialWindow()); } /*! @@ -1573,7 +1577,7 @@ Window Client::wmClientLeader() const bool Client::wantsTabFocus() const { - return ( isNormalWindow() || isDialog() || isOverride()) + return ( isNormalWindow() || isDialog()) && wantsInput() && !skip_taskbar; } @@ -1609,11 +1613,6 @@ bool Client::isToolbar() const return windowType() == NET::Toolbar; } -bool Client::isOverride() const - { - return windowType() == NET::Override; - } - bool Client::isSplash() const { return windowType() == NET::Splash; @@ -1637,7 +1636,6 @@ bool Client::isNormalWindow() const bool Client::isSpecialWindow() const { return isDesktop() || isDock() || isSplash() || isTopMenu() - || ( isOverride() && !isFullScreen())// SELI is NET::Override special or not? || isToolbar(); // TODO } diff --git a/client.h b/client.h index aff36dc2d0..83bb37d2f3 100644 --- a/client.h +++ b/client.h @@ -172,7 +172,6 @@ class Client : public QObject, public KDecorationDefines bool isDialog() const; bool isSplash() const; bool isUtility() const; - bool isOverride() const; // not override redirect, but NET::Override // returns true for "special" windows and false for windows which are "normal" // (normal=window which has a border, can be moved by the user, can be closed, etc.) // true for Desktop, Dock, Splash, Override and TopMenu (and Toolbar??? - for now) diff --git a/clients/laptop/laptopclient.cpp b/clients/laptop/laptopclient.cpp index 641cc3768a..1ff51694e9 100644 --- a/clients/laptop/laptopclient.cpp +++ b/clients/laptop/laptopclient.cpp @@ -650,7 +650,7 @@ void LaptopClient::updateActiveBuffer( ) static const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | - NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | + NET::DialogMask | /*NET::OverrideMask |*/ NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; bool LaptopClient::isTransient() const diff --git a/clients/test/test.h b/clients/test/test.h index 1cde924183..56e21dbc0d 100644 --- a/clients/test/test.h +++ b/clients/test/test.h @@ -9,7 +9,7 @@ namespace KWinTest { const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask - | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask + | NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; class Decoration diff --git a/events.cpp b/events.cpp index 03539965d1..77e72ac6ab 100644 --- a/events.cpp +++ b/events.cpp @@ -1182,7 +1182,7 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in { bool replay = performMouseCommand( com, QPoint( x_root, y_root), perform_handled ); - if ( isSpecialWindow() && !isOverride()) + if ( isSpecialWindow()) replay = TRUE; if( w == wrapperId()) // these can come only from a grab diff --git a/geometry.cpp b/geometry.cpp index 2d47d5ec13..f496d89730 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -882,8 +882,6 @@ void Client::checkWorkspacePosition() } if( isDock()) return; - if( isOverride()) - return; // I wish I knew what to do here :( if( isTopMenu()) { if( workspace()->managingTopMenus()) @@ -1542,7 +1540,7 @@ bool Client::isMovable() const { if( !motif_may_move || isFullScreen()) return false; - if( isSpecialWindow() && !isOverride() && !isSplash() && !isToolbar()) // allow moving of splashscreens :) + if( isSpecialWindow() && !isSplash() && !isToolbar()) // allow moving of splashscreens :) return false; if( maximizeMode() == MaximizeFull && !options->moveResizeMaximizedWindows() ) return false; @@ -1558,7 +1556,7 @@ bool Client::isResizable() const { if( !motif_may_resize || isFullScreen()) return false; - if(( isSpecialWindow() || isSplash() || isToolbar()) && !isOverride()) + if( isSpecialWindow() || isSplash() || isToolbar()) return false; if( maximizeMode() == MaximizeFull && !options->moveResizeMaximizedWindows() ) return false; @@ -1934,7 +1932,7 @@ bool Client::isFullScreenable( bool fullscreen_hack ) const if( !rules()->checkFullScreen( true )) return false; if( fullscreen_hack ) - return isNormalWindow() || isOverride(); + return isNormalWindow(); if( rules()->checkStrictGeometry( false )) { // the app wouldn't fit exactly fullscreen geometry due its strict geometry requirements diff --git a/lib/kcommondecoration.cpp b/lib/kcommondecoration.cpp index 344ea1380d..41086e27e1 100644 --- a/lib/kcommondecoration.cpp +++ b/lib/kcommondecoration.cpp @@ -843,7 +843,7 @@ bool KCommonDecoration::eventFilter( QObject* o, QEvent* e ) } const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask - | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask + | NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; bool KCommonDecoration::isToolWindow() const diff --git a/manage.cpp b/manage.cpp index 502a267782..c742d9b1d6 100644 --- a/manage.cpp +++ b/manage.cpp @@ -163,7 +163,7 @@ bool Client::manage( Window w, bool isMapped ) it != mainclients.end(); ++it ) { - if( (*it)->isSpecialWindow() && !(*it)->isOverride()) + if( (*it)->isSpecialWindow()) continue; // don't consider toolbars etc when placing maincl = *it; if( (*it)->isOnCurrentDesktop()) @@ -454,13 +454,13 @@ bool Client::manage( Window w, bool isMapped ) { if( allow && isOnCurrentDesktop()) { - if( !isSpecialWindow() || isOverride()) + if( !isSpecialWindow()) if ( options->focusPolicyIsReasonable() && wantsTabFocus() ) workspace()->requestFocus( this ); } else { - if( !session && ( !isSpecialWindow() || isOverride())) + if( !session && !isSpecialWindow()) demandAttention(); } } diff --git a/placement.cpp b/placement.cpp index aae18cd291..b170d32231 100644 --- a/placement.cpp +++ b/placement.cpp @@ -447,7 +447,7 @@ void Placement::placeOnMainWindow(Client* c, QRect& area ) it != mainwindows.end(); ++it ) { - if( (*it)->isSpecialWindow() && !(*it)->isOverride()) + if( (*it)->isSpecialWindow()) continue; // don't consider toolbars etc when placing ++mains_count; place_on2 = *it; diff --git a/sm.cpp b/sm.cpp index 841aeb21e0..aae54a3750 100644 --- a/sm.cpp +++ b/sm.cpp @@ -242,7 +242,7 @@ bool Workspace::sessionInfoWindowTypeMatch( Client* c, SessionInfo* info ) { if( info->windowType == -2 ) { // undefined (not really part of NET::WindowType) - return !c->isSpecialWindow() || c->isOverride(); + return !c->isSpecialWindow(); } return info->windowType == c->windowType(); } diff --git a/utils.h b/utils.h index 9e1dcddb74..3e3533e5e6 100644 --- a/utils.h +++ b/utils.h @@ -22,7 +22,7 @@ namespace KWinInternal { const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask - | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask + | NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; const long ClientWinMask = KeyPressMask | KeyReleaseMask |