diff --git a/client.h b/client.h index 3305bdd0fe..a29f260294 100644 --- a/client.h +++ b/client.h @@ -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; diff --git a/manage.cpp b/manage.cpp index e6a11c1c22..44d12f6926 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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 diff --git a/placement.cpp b/placement.cpp index 530bb9092c..ff4ca4b8e7 100644 --- a/placement.cpp +++ b/placement.cpp @@ -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)