Have you seen a lady fairer?

CCMAIL: l.lunak@kde.org

svn path=/trunk/kdebase/kwin/; revision=208077
This commit is contained in:
George Staikos 2003-02-20 05:52:39 +00:00
parent 3fae0948db
commit e34b22234d
2 changed files with 4 additions and 25 deletions

View file

@ -21,6 +21,7 @@ Copyright (C) 2002 Alexander Kellett <lypanov@kde.org>
#include <qdesktopwidget.h>
#include <qcursor.h>
#include <kstringhandler.h>
#include <kglobalsettings.h>
// specify externals before namespace
@ -51,18 +52,7 @@ PopupInfo::~PopupInfo()
*/
void PopupInfo::reset()
{
QDesktopWidget* desktop = qApp->desktop();
KConfig gc("kdeglobals", false, false);
gc.setGroup("Windows");
QRect r;
if (QApplication::desktop()->isVirtualDesktop() &&
gc.readBoolEntry("XineramaEnabled", true) &&
gc.readBoolEntry("XineramaPlacementEnabled", true)) {
int screen = desktop->screenNumber( QCursor::pos() );
r = desktop->screenGeometry(screen);
} else {
r = desktop->geometry();
}
QRect r = KGlobalSettings::desktopGeometry(QCursor::pos());
int w = fontMetrics().width( m_infoString ) + 30;

View file

@ -19,6 +19,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
#include <qdesktopwidget.h>
#include <qcursor.h>
#include <kstringhandler.h>
#include <kglobalsettings.h>
// specify externals before namespace
@ -94,19 +95,7 @@ void TabBox::reset()
desk = workspace()->currentDesktop();
}
QDesktopWidget* desktop = qApp->desktop();
QRect r;
KConfig gc("kdeglobals", false, false);
gc.setGroup("Windows");
if (QApplication::desktop()->isVirtualDesktop() &&
gc.readBoolEntry("XineramaEnabled", true) &&
gc.readBoolEntry("XineramaPlacementEnabled", true)) {
int screen = desktop->screenNumber( QCursor::pos() );
r = desktop->screenGeometry(screen);
} else {
r = desktop->geometry();
}
QRect r = KGlobalSettings::desktopGeometry(QCursor::pos());
int w = QMIN( QMAX( wmax + 20, r.width()/3 ), r.width() );
setGeometry( (r.width()-w)/2 + r.x(),