do not manage magic for java applets

svn path=/trunk/kdebase/kwin/; revision=56985
This commit is contained in:
Matthias Ettrich 2000-07-15 01:12:41 +00:00
parent bda93628e4
commit 7ca46b1e1c
5 changed files with 41 additions and 8 deletions

View file

@ -12,6 +12,7 @@ class KWinInterface : virtual public DCOPObject
virtual ASYNC cascadeDesktop() = 0;
virtual ASYNC unclutterDesktop() = 0;
virtual ASYNC reconfigure() = 0;
virtual void doNotManage(QString)= 0;
};

View file

@ -480,7 +480,7 @@ Client::~Client()
Manages the clients. This means handling the very first maprequest:
reparenting, initial geometry, initial state, placement, etc.
*/
bool Client::manage( bool isMapped, bool isReset )
bool Client::manage( bool isMapped, bool doNotShow )
{
if (layout())
@ -564,13 +564,16 @@ bool Client::manage( bool isMapped, bool isReset )
}
info->setDesktop( desk );
setMappingState( state );
bool showMe = state == NormalState && isOnDesktop( workspace()->currentDesktop() );
if ( showMe && !isReset ) {
if ( workspace()->isNotManaged( caption() ) )
doNotShow = TRUE;
if ( showMe && !doNotShow ) {
Events::raise( isTransient() ? Events::TransNew : Events::New );
if ( isMapped ) {
show();
@ -588,10 +591,10 @@ bool Client::manage( bool isMapped, bool isReset )
}
delete session;
if ( !isReset )
if ( !doNotShow )
workspace()->updateClientArea();
return showMe;
}

View file

@ -74,7 +74,7 @@ public:
virtual bool windowEvent( XEvent * );
bool manage( bool isMapped = FALSE, bool isReset = FALSE );
bool manage( bool isMapped = FALSE, bool doNotShow = FALSE );
void setMappingState( int s );
int mappingState() const;

View file

@ -1491,6 +1491,28 @@ void Workspace::reconfigure()
}
/*!
avoids managing a window with title \a title
*/
void Workspace::doNotManage( QString title )
{
doNotManageList.append( title );
}
/*!
Hack for java applets
*/
bool Workspace::isNotManaged( const QString& title )
{
for ( QStringList::Iterator it = doNotManageList.begin(); it != doNotManageList.end(); ++it ) {
if ( (*it) == title ) {
doNotManageList.remove( it );
return TRUE;
}
}
return FALSE;
}
/*!
Lowers the client \a c taking stays-on-top flags, layers,
transient windows and window groups into account.
@ -2698,4 +2720,5 @@ void Workspace::saveDesktopSettings()
}
#include "workspace.moc"

View file

@ -174,8 +174,11 @@ public:
void cascadeDesktop();
void unclutterDesktop();
void reconfigure();
void doNotManage(QString);
QString desktopName( int desk );
bool isNotManaged( const QString& title );
public slots:
void setCurrentDesktop( int new_desktop );
@ -309,6 +312,9 @@ private:
QWidget* supportWindow;
QRect area;
// swallowing
QStringList doNotManageList;
};
inline WId Workspace::rootWin() const