summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-02-05 00:03:50 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-02-05 00:03:50 +0800
commit66f4693a0bc49c2cac25a37823fdbbb14d3aa970 (patch)
tree682f87e77b2386e93a1237162b525e5f4f085459
parent08c22af5823771444b8c189c265a526ccb998068 (diff)
parentd6769e8e58c5582dbcfb1b713a3e44673f75f451 (diff)
downloadzcomp-66f4693a0bc49c2cac25a37823fdbbb14d3aa970.tar.gz
zcomp-66f4693a0bc49c2cac25a37823fdbbb14d3aa970.tar.bz2
Merge branch 'master' of git+ssh://git.compiz.org/git/compiz/core
Conflicts: plugins/place/src/place.cpp
-rw-r--r--include/core/screen.h4
-rw-r--r--plugins/decor/src/decor.cpp12
-rw-r--r--plugins/decor/src/decor.h1
-rw-r--r--plugins/place/src/place.cpp10
-rw-r--r--src/screen.cpp19
5 files changed, 33 insertions, 13 deletions
diff --git a/include/core/screen.h b/include/core/screen.h
index ff971de..eb6332d 100644
--- a/include/core/screen.h
+++ b/include/core/screen.h
@@ -128,7 +128,7 @@ class ScreenInterface : public WrapableInterface<CompScreen, ScreenInterface> {
class CompScreen :
public CompSize,
- public WrapableHandler<ScreenInterface, 17>,
+ public WrapableHandler<ScreenInterface, 18>,
public PluginClassStorage,
public CompOption::Class
{
@@ -321,6 +321,8 @@ class CompScreen :
bool updateDefaultIcon ();
+ void updateSupportedWmHints ();
+
static unsigned int allocPluginClassIndex ();
static void freePluginClassIndex (unsigned int index);
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 0f3c6bd..6e24bd4 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -1602,6 +1602,14 @@ DecorScreen::matchPropertyChanged (CompWindow *w)
screen->matchPropertyChanged (w);
}
+void
+DecorScreen::addSupportedAtoms (std::vector<Atom> &atoms)
+{
+ screen->addSupportedAtoms (atoms);
+
+ atoms.push_back (requestFrameExtentsAtom);
+}
+
bool
DecorScreen::decoratorStartTimeout ()
{
@@ -1670,6 +1678,7 @@ DecorScreen::DecorScreen (CompScreen *s) :
0);
ScreenInterface::setHandler (s);
+ screen->updateSupportedWmHints ();
}
DecorScreen::~DecorScreen ()
@@ -1677,6 +1686,9 @@ DecorScreen::~DecorScreen ()
for (unsigned int i = 0; i < DECOR_NUM; i++)
if (decor[i])
Decoration::release (decor[i]);
+
+ screen->addSupportedAtomsSetEnabled (this, false);
+ screen->updateSupportedWmHints ();
}
DecorWindow::DecorWindow (CompWindow *w) :
diff --git a/plugins/decor/src/decor.h b/plugins/decor/src/decor.h
index ed3eaaf..5e31a49 100644
--- a/plugins/decor/src/decor.h
+++ b/plugins/decor/src/decor.h
@@ -116,6 +116,7 @@ class DecorScreen :
void handleEvent (XEvent *event);
void matchPropertyChanged (CompWindow *);
+ void addSupportedAtoms (std::vector<Atom>&);
DecorTexture * getTexture (Pixmap);
void releaseTexture (DecorTexture *);
diff --git a/plugins/place/src/place.cpp b/plugins/place/src/place.cpp
index 8185b7e..8a3f555 100644
--- a/plugins/place/src/place.cpp
+++ b/plugins/place/src/place.cpp
@@ -31,23 +31,21 @@ PlaceScreen::PlaceScreen (CompScreen *screen) :
fullPlacementAtom (XInternAtom (screen->dpy (),
"_NET_WM_FULL_PLACEMENT", 0))
{
- std::vector<Atom> atoms;
- ScreenInterface::setHandler (screen);
- screen->addSupportedAtoms (atoms);
-
+ ScreenInterface::setHandler (screen);
mResChangeFallbackHandle.setCallback (boost::bind (
&PlaceScreen::handleScreenSizeChangeFallback,
this));
mResChangeFallbackHandle.setTimes (4000, 4500); /* 4 Seconds */
+
+ screen->updateSupportedWmHints ();
}
PlaceScreen::~PlaceScreen ()
{
- std::vector<Atom> atoms;
screen->addSupportedAtomsSetEnabled (this, false);
- screen->addSupportedAtoms (atoms);
mResChangeFallbackHandle.stop ();
+ screen->updateSupportedWmHints ();
}
void
diff --git a/src/screen.cpp b/src/screen.cpp
index 5429e71..d9d2731 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -2123,6 +2123,18 @@ PrivateScreen::setSupportingWmCheck ()
}
void
+CompScreen::updateSupportedWmHints ()
+{
+ std::vector<Atom> atoms;
+
+ addSupportedAtoms (atoms);
+
+ XChangeProperty (dpy (), root (), Atoms::supported,
+ XA_ATOM, 32, PropModeReplace,
+ (const unsigned char *) &atoms.at (0), atoms.size ());
+}
+
+void
CompScreen::addSupportedAtoms (std::vector<Atom> &atoms)
{
WRAPABLE_HND_FUNC (17, addSupportedAtoms, atoms);
@@ -2220,10 +2232,6 @@ CompScreen::addSupportedAtoms (std::vector<Atom> &atoms)
atoms.push_back (Atoms::restackWindow);
atoms.push_back (Atoms::wmFullscreenMonitors);
-
- XChangeProperty (dpy (), root (), Atoms::supported,
- XA_ATOM, 32, PropModeReplace,
- (const unsigned char *) &atoms.at (0), atoms.size ());
}
void
@@ -4077,7 +4085,6 @@ CompScreen::init (const char *name)
unsigned int nchildren;
int defaultDepth, nvisinfo;
XSetWindowAttributes attrib;
- std::vector<Atom> atomList;
CompOption::Value::Vector vList;
@@ -4410,7 +4417,7 @@ CompScreen::init (const char *name)
priv->setDesktopHints ();
priv->setSupportingWmCheck ();
- addSupportedAtoms (atomList);
+ updateSupportedWmHints ();
priv->normalCursor = XCreateFontCursor (dpy, XC_left_ptr);
priv->busyCursor = XCreateFontCursor (dpy, XC_watch);