Try to place dialogs on their mainwindow. Except for non-NETWM apps

where the it's transient therefore it's a dialog assumption is not true
often enough for this to be annoying.

svn path=/trunk/kdebase/kwin/; revision=255614
This commit is contained in:
Luboš Luňák 2003-10-02 08:56:44 +00:00
parent 6f272da774
commit 3e1df92066
3 changed files with 16 additions and 7 deletions

View file

@ -155,6 +155,7 @@ class Client : public QObject, public KDecorationDefines
// auxiliary functions, depend on the windowType
bool wantsTabFocus() const;
bool wantsInput() const;
bool hasNETSupport() const;
bool isMovable() const;
bool isDesktop() const;
bool isDock() const;
@ -666,6 +667,11 @@ inline bool Client::isModal() const
return modal;
}
inline bool Client::hasNETSupport() const
{
return info->hasNETSupport();
}
inline Colormap Client::colormap() const
{
return cmap;

View file

@ -220,12 +220,10 @@ bool Client::manage( Window w, bool isMapped )
{ // TODO
placementDone = TRUE;
}
else if( isDialog())
{
if( false )
placementDone = true;
// else force using placement policy
}
else if( isTransient() && !hasNETSupport())
placementDone = true;
else if( isDialog() && hasNETSupport()) // see Placement::placeDialog()
; // force using placement policy
else if( isSplash())
; // force using placement policy
else

View file

@ -402,8 +402,13 @@ void Placement::placeUtility(Client* c)
}
void Placement::placeDialog(Client*)
void Placement::placeDialog(Client* c)
{
// if the dialog is actually non-NETWM transient window, don't apply placement to it,
// it breaks with too many things (xmms, display)
if( !c->hasNETSupport())
return;
placeOnMainWindow( c );
}
void Placement::placeUnderMouse(Client* c)