From e34b22234dee9bc0aedc8e6516fd6487beaae106 Mon Sep 17 00:00:00 2001 From: George Staikos Date: Thu, 20 Feb 2003 05:52:39 +0000 Subject: [PATCH] Have you seen a lady fairer? CCMAIL: l.lunak@kde.org svn path=/trunk/kdebase/kwin/; revision=208077 --- popupinfo.cpp | 14 ++------------ tabbox.cpp | 15 ++------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/popupinfo.cpp b/popupinfo.cpp index 61cd95879b..b9240fa03c 100644 --- a/popupinfo.cpp +++ b/popupinfo.cpp @@ -21,6 +21,7 @@ Copyright (C) 2002 Alexander Kellett #include #include #include +#include // 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; diff --git a/tabbox.cpp b/tabbox.cpp index fc3703d5fe..cd835a8ac0 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -19,6 +19,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include +#include // 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(),