2006-07-04 20:02:07 +00:00
|
|
|
/*****************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2006 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
|
|
|
You can Freely distribute this program under the GNU General Public
|
|
|
|
License. See the file "COPYING" for the exact licensing terms.
|
|
|
|
******************************************************************/
|
|
|
|
|
|
|
|
#include "toplevel.h"
|
|
|
|
|
|
|
|
namespace KWinInternal
|
|
|
|
{
|
|
|
|
|
|
|
|
Toplevel::Toplevel( Workspace* ws )
|
2006-07-05 22:26:34 +00:00
|
|
|
: vis( None )
|
|
|
|
, id( None )
|
2006-07-04 20:02:07 +00:00
|
|
|
, wspace( ws )
|
2006-07-05 16:04:11 +00:00
|
|
|
, damage_handle( None )
|
2006-09-30 17:28:27 +00:00
|
|
|
, is_shape( false )
|
2006-07-04 20:02:07 +00:00
|
|
|
{
|
|
|
|
}
|
2006-07-05 20:52:57 +00:00
|
|
|
|
2006-07-04 20:02:07 +00:00
|
|
|
Toplevel::~Toplevel()
|
|
|
|
{
|
2006-07-13 18:17:49 +00:00
|
|
|
assert( damage_handle == None );
|
2006-07-04 20:02:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
kdbgstream& operator<<( kdbgstream& stream, const Toplevel* cl )
|
|
|
|
{
|
|
|
|
if( cl == NULL )
|
|
|
|
return stream << "\'NULL\'";
|
|
|
|
cl->debug( stream );
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
|
|
|
|
kdbgstream& operator<<( kdbgstream& stream, const ToplevelList& list )
|
|
|
|
{
|
|
|
|
stream << "LIST:(";
|
|
|
|
bool first = true;
|
|
|
|
for( ToplevelList::ConstIterator it = list.begin();
|
|
|
|
it != list.end();
|
|
|
|
++it )
|
|
|
|
{
|
|
|
|
if( !first )
|
|
|
|
stream << ":";
|
|
|
|
first = false;
|
|
|
|
stream << *it;
|
|
|
|
}
|
|
|
|
stream << ")";
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
|
|
|
|
kdbgstream& operator<<( kdbgstream& stream, const ConstToplevelList& list )
|
|
|
|
{
|
|
|
|
stream << "LIST:(";
|
|
|
|
bool first = true;
|
|
|
|
for( ConstToplevelList::ConstIterator it = list.begin();
|
|
|
|
it != list.end();
|
|
|
|
++it )
|
|
|
|
{
|
|
|
|
if( !first )
|
|
|
|
stream << ":";
|
|
|
|
first = false;
|
|
|
|
stream << *it;
|
|
|
|
}
|
|
|
|
stream << ")";
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2006-09-30 17:28:27 +00:00
|
|
|
void Toplevel::detectShape( Window id )
|
|
|
|
{
|
|
|
|
is_shape = Extensions::hasShape( id );
|
|
|
|
}
|
2006-07-04 20:02:07 +00:00
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#include "toplevel.moc"
|