[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_1_BRANCH: kdebase/kdesktop
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2003-04-09 10:36:47
[Download RAW message or body]
CVS commit by lunakl:
Backport no setting of ESETROOT_PMAP_ID.
M +20 -19 bgmanager.cc 1.70.2.1
M +3 -1 bgmanager.h 1.23.4.1
--- kdebase/kdesktop/bgmanager.cc #1.70:1.70.2.1
@@ -43,5 +43,4 @@ template class QMemArray<int>;
Atom prop_root;
-Atom prop_esetroot;
bool properties_inited = false;
@@ -54,5 +53,4 @@ KBackgroundManager::KBackgroundManager(Q
{
prop_root = XInternAtom(qt_xdisplay(), "_XROOTPMAP_ID", False);
- prop_esetroot = XInternAtom(qt_xdisplay(), "ESETROOT_PMAP_ID", False);
properties_inited = true;
}
@@ -75,4 +73,5 @@ KBackgroundManager::KBackgroundManager(Q
m_pKwinmodule = kwinModule;
m_pPixmapServer = new KPixmapServer();
+ m_xrootpmap = None;
for (unsigned i=0; i<m_Renderer.size(); i++)
@@ -109,9 +108,17 @@ KBackgroundManager::~KBackgroundManager(
// clear the Esetroot properties, as the pixmaps they refer to are going away...
- if (prop_root != None || prop_esetroot != None) // if they exist, we need to \
cleanup so GTK apps don't crash
- {
+ Pixmap pm = None;
+ Atom type;
+ int format;
+ unsigned long length, after;
+ unsigned char* data_root, *data_esetroot;
+ XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), prop_root, 0L, 1L, False, \
AnyPropertyType, + &type, &format, &length, &after, &data_root);
+ if (type == XA_PIXMAP)
+ pm = *((Pixmap*)data_root);
+ // only if it's our pixmap
+ if( pm == m_xrootpmap )
XDeleteProperty(qt_xdisplay(), qt_xrootwin(), prop_root);
- XDeleteProperty(qt_xdisplay(), qt_xrootwin(), prop_esetroot);
- }
+ m_xrootpmap = None;
if (m_bExport)
@@ -346,16 +353,10 @@ void KBackgroundManager::setPixmap(KPixm
//kdDebug() << "Esetroot compat: setting pixmap to " << bgPm << endl;
- //Esetroot does a bunch of work to track down and kill pixmaps that are old \
here...
- // I don't think I need to, as qt should be the one owning the pixmap
+ // don't set the ESETROOT_PMAP_ID property - that would result in possible \
XKillClient() + // done on kdesktop
- /* The call above should have created it. If that failed, oh well - Esetroot is \
just cake anyway. */
- if (prop_root != None && prop_esetroot != None) {
XChangeProperty(qt_xdisplay(), qt_xrootwin(), prop_root, XA_PIXMAP, 32, \
PropModeReplace, (unsigned char *) &bgPm, 1);
- XChangeProperty(qt_xdisplay(), qt_xrootwin(), prop_esetroot, XA_PIXMAP, 32, \
PropModeReplace,
- (unsigned char *) &bgPm, 1);
- } else {
- kdDebug() << "Esetroot compat: creation of pixmap property failed." << \
endl;
- }
+ m_xrootpmap = bgPm;
m_Hash = hash;
--- kdebase/kdesktop/bgmanager.h #1.23:1.23.4.1
@@ -112,4 +112,6 @@ private:
KWinModule *m_pKwinmodule;
KPixmapServer *m_pPixmapServer;
+
+ unsigned long m_xrootpmap;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic