Have you seen a lady fairer?
CCMAIL: l.lunak@kde.org svn path=/trunk/kdebase/kwin/; revision=208077
This commit is contained in:
parent
3fae0948db
commit
e34b22234d
2 changed files with 4 additions and 25 deletions
|
@ -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;
|
||||
|
||||
|
|
15
tabbox.cpp
15
tabbox.cpp
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue