summaryrefslogtreecommitdiffstats
path: root/kcontrol/background/bgrender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/background/bgrender.cpp')
-rw-r--r--kcontrol/background/bgrender.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp
index f17892dce..47d52b193 100644
--- a/kcontrol/background/bgrender.cpp
+++ b/kcontrol/background/bgrender.cpp
@@ -54,8 +54,7 @@ KBackgroundRenderer::KBackgroundRenderer(int desk, int screen, bool drawBackgrou
m_isBusyCursor = false;
m_enableBusyCursor = false;
m_pDirs = KGlobal::dirs();
- m_rSize = m_Size = drawBackgroundPerScreen ?
- QApplication::desktop()->screenGeometry(screen).size() : QApplication::desktop()->size();
+ m_rSize = m_Size = drawBackgroundPerScreen ? KApplication::desktop()->screenGeometry(screen).size() : KApplication::desktop()->geometry().size();
m_pProc = 0L;
m_Tempfile = 0L;
m_bPreview = false;
@@ -86,8 +85,7 @@ void KBackgroundRenderer::setSize(const QSize &size)
void KBackgroundRenderer::desktopResized()
{
m_State = 0;
- m_rSize = drawBackgroundPerScreen() ?
- QApplication::desktop()->screenGeometry(screen()).size() : QApplication::desktop()->size();
+ m_rSize = drawBackgroundPerScreen() ? KApplication::desktop()->screenGeometry(screen()).size() : KApplication::desktop()->geometry().size();
if( !m_bPreview )
m_Size = m_rSize;
}
@@ -1048,7 +1046,7 @@ KVirtualBGRenderer::KVirtualBGRenderer( int desk, KConfig *config )
}
initRenderers();
- m_size = QApplication::desktop()->size();
+ m_size = KApplication::desktop()->geometry().size();
}
KVirtualBGRenderer::~KVirtualBGRenderer()
@@ -1155,7 +1153,7 @@ void KVirtualBGRenderer::setEnabled(bool enable)
void KVirtualBGRenderer::desktopResized()
{
- m_size = QApplication::desktop()->size();
+ m_size = KApplication::desktop()->geometry().size();
if (m_pPixmap)
{
@@ -1164,7 +1162,7 @@ void KVirtualBGRenderer::desktopResized()
m_pPixmap->fill(Qt::black);
}
- initRenderers();
+ initRenderers();
}
@@ -1196,8 +1194,7 @@ void KVirtualBGRenderer::setPreview(const QSize & size)
QSize KVirtualBGRenderer::renderSize(int screen)
{
- return m_bDrawBackgroundPerScreen ?
- QApplication::desktop()->screenGeometry(screen).size() : QApplication::desktop()->size();
+ return m_bDrawBackgroundPerScreen ? KApplication::desktop()->screenGeometry(screen).size() : KApplication::desktop()->geometry().size();
}
@@ -1208,7 +1205,7 @@ void KVirtualBGRenderer::initRenderers()
m_bCommonScreen = m_pConfig->readBoolEntry("CommonScreen", _defCommonScreen);
- m_numRenderers = m_bDrawBackgroundPerScreen ? QApplication::desktop()->numScreens() : 1;
+ m_numRenderers = m_bDrawBackgroundPerScreen ? KApplication::desktop()->numScreens() : 1;
m_bFinished.resize(m_numRenderers);
m_bFinished.fill(false);
@@ -1267,10 +1264,11 @@ void KVirtualBGRenderer::screenDone(int _desk, int _screen)
// There's more than one renderer, so we are drawing each output to our own pixmap
QRect overallGeometry;
- for (int i=0; i < QApplication::desktop()->numScreens(); ++i)
- overallGeometry |= QApplication::desktop()->screenGeometry(i);
+ for (int i=0; i < KApplication::desktop()->numScreens(); ++i) {
+ overallGeometry |= KApplication::desktop()->screenGeometry(i);
+ }
- QPoint drawPos = QApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft();
+ QPoint drawPos = KApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft();
drawPos.setX( int(drawPos.x() * m_scaleX) );
drawPos.setY( int(drawPos.y() * m_scaleY) );