Die, window type override, die! Since nobody really knows what this window

type means anyway, let's simply consider it to be a legacy way of saying "noborder"
and nothing more.


svn path=/trunk/KDE/kdebase/kwin/; revision=412372
This commit is contained in:
Luboš Luňák 2005-05-11 14:20:54 +00:00
parent 7d49e2a4a0
commit ced5ab580a
11 changed files with 21 additions and 26 deletions

View file

@ -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
}

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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();
}
}

View file

@ -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;

2
sm.cpp
View file

@ -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();
}

View file

@ -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 |