summaryrefslogtreecommitdiffstats
path: root/kcontrol/background/bgrender.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kcontrol/background/bgrender.cpp
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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) );