summaryrefslogtreecommitdiffstats
path: root/kdesktop/bgmanager.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-07 21:52:26 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-07 21:52:26 -0500
commit4d21a120d2478b8d0abe7ecaf9a688f2aa88c049 (patch)
tree0c3475fbb2629c5532e29e5e8acba1a0a67dafbe /kdesktop/bgmanager.cc
parentd9227036c7b8878625c46402065ecd6b2c1e67d6 (diff)
downloadtdebase-4d21a120d2478b8d0abe7ecaf9a688f2aa88c049.tar.gz
tdebase-4d21a120d2478b8d0abe7ecaf9a688f2aa88c049.zip
Commit the following patch from Bug 1499:
tdebase: fix kdesktop resize bug
Diffstat (limited to 'kdesktop/bgmanager.cc')
-rw-r--r--kdesktop/bgmanager.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/kdesktop/bgmanager.cc b/kdesktop/bgmanager.cc
index 32f774357..4b3bca252 100644
--- a/kdesktop/bgmanager.cc
+++ b/kdesktop/bgmanager.cc
@@ -118,6 +118,7 @@ KBackgroundManager::KBackgroundManager(TQWidget *desktop, KWinModule* twinModule
/*CrossFade's config*/
m_crossTimer = new TQTimer(this);
connect(m_crossTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCrossFadeTimeout()));
+ resizingDesktop = true;
/*Ends here*/
@@ -351,6 +352,7 @@ void KBackgroundManager::slotChangeNumberOfDesktops(int num)
*/
void KBackgroundManager::slotChangeDesktop(int desk)
{
+ resizingDesktop = true;
TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
@@ -631,11 +633,11 @@ void KBackgroundManager::slotImageDone(int desk)
m_numberOfViewports = 1;
t_useViewports = 0;
}
-
+
KPixmap *pm = new KPixmap();
KVirtualBGRenderer *r = m_Renderer[desk];
bool do_cleanup = true;
- fadeDesk = desk;
+ fadeDesk = desk;
mAlpha = 1.0;
int width,height;
@@ -646,7 +648,7 @@ void KBackgroundManager::slotImageDone(int desk)
if (current)
{
//START
- if (m_Renderer[effectiveDesktop()]->renderer(0)->crossFadeBg() && !m_Renderer[effectiveDesktop()]->renderer(0)->usingCrossXml()){
+ if (m_Renderer[effectiveDesktop()]->renderer(0)->crossFadeBg() && !m_Renderer[effectiveDesktop()]->renderer(0)->usingCrossXml() && !resizingDesktop) {
int mode = m_Renderer[effectiveDesktop()]->renderer(0)->wallpaperMode();
width = TQApplication::desktop()->screenGeometry().width();
height = TQApplication::desktop()->screenGeometry().height();
@@ -654,7 +656,7 @@ void KBackgroundManager::slotImageDone(int desk)
if (mode == KBackgroundSettings::NoWallpaper || mode == KBackgroundSettings::Tiled || mode == KBackgroundSettings::CenterTiled ){
mNextScreen = TQPixmap(width,height);
TQPainter p (&mNextScreen);
- p.drawTiledPixmap(0,0,width,height,*pm);
+ p.drawTiledPixmap(0,0,width,height,*pm);
} else {
mNextScreen = TQPixmap(*pm);
}
@@ -700,6 +702,8 @@ void KBackgroundManager::slotImageDone(int desk)
r->saveCacheFile();
r->cleanup();
}
+
+ resizingDesktop = false;
}
@@ -1004,6 +1008,7 @@ void KBackgroundManager::repaintBackground()
void KBackgroundManager::desktopResized()
{
+ resizingDesktop = true;
for (unsigned i=0; i<m_Renderer.size(); i++)
{
KVirtualBGRenderer * r = m_Renderer[i];
@@ -1025,8 +1030,12 @@ void KBackgroundManager::desktopResized()
#endif
m_Hash = 0;
- if( m_pDesktop )
+ if( m_pDesktop ) {
m_pDesktop->resize( kapp->desktop()->geometry().size());
+ if (m_Renderer[effectiveDesktop()]->renderer(0)->usingCrossXml()){
+ m_Renderer[effectiveDesktop()]->renderer(0)->changeWallpaper();
+ }
+ }
// Repaint desktop
slotChangeDesktop(0);
repaintBackground();