Added "IgnorePositionClasses" configuration option to set X classes of windows for which PPosition hint should be ignored. This should lastly solve the invalid Motif windows placement problem

svn path=/trunk/kdebase/kwin/; revision=68724
This commit is contained in:
Nikita V. Youshchenko 2000-10-23 18:27:23 +00:00
parent 2d3925116e
commit c88fc0bc77
3 changed files with 20 additions and 1 deletions

View file

@ -538,7 +538,18 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
if ( isMapped || session || isTransient() ) {
placementDone = TRUE;
} else {
if ( (xSizeHint.flags & PPosition) || (xSizeHint.flags & USPosition) ) {
bool ignorePPosition = false;
XClassHint classHint;
if ( XGetClassHint(qt_xdisplay(), win, &classHint) != 0 ) {
if ( classHint.res_class )
ignorePPosition = ( options->ignorePositionClasses.find(QString::fromLatin1(classHint.res_class)) != options->ignorePositionClasses.end() );
XFree(classHint.res_name);
XFree(classHint.res_class);
}
if ( ( (xSizeHint.flags & PPosition) && !ignorePPosition ) ||
(xSizeHint.flags & USPosition) ) {
placementDone = TRUE;
if ( windowType() == NET::Normal && !area.contains( geom.topLeft() ) && may_move ) {
int tx = geom.x();

View file

@ -184,6 +184,8 @@ void Options::reload()
OpTitlebarDblClick = windowOperation( config->readEntry("TitlebarDoubleClickCommand", "Shade") );
ignorePositionClasses = config->readListEntry("IgnorePositionClasses");
// Mouse bindings
config->setGroup( "MouseBindings");
CmdActiveTitlebar1 = mouseCommand(config->readEntry("CommandActiveTitlebar1","Raise"));

View file

@ -9,6 +9,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
#include <qobject.h>
#include <qfont.h>
#include <qpalette.h>
#include <qstringlist.h>
// increment this when you add a color type (mosfet)
#define KWINCOLORS 6
@ -167,6 +168,11 @@ public:
int animateMinimizeSpeed;
/**
* List of window classes to ignore PPosition size hint
*/
QStringList ignorePositionClasses;
// mouse bindings
enum WindowOperation{