summaryrefslogtreecommitdiff
path: root/src/titleinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/titleinfo.cpp')
-rw-r--r--src/titleinfo.cpp38
1 files changed, 16 insertions, 22 deletions
diff --git a/src/titleinfo.cpp b/src/titleinfo.cpp
index 7a5d244..dc9e011 100644
--- a/src/titleinfo.cpp
+++ b/src/titleinfo.cpp
@@ -208,30 +208,15 @@ TitleinfoWindow::updateMachine ()
if (ts->optionGetShowRemoteMachine ())
updateVisibleName ();
}
-/*
-static unsigned int
-titleinfoAddSupportedAtoms (CompScreen *s,
- Atom *atoms,
- unsigned int size)
-{
- unsigned int count;
-
- TITLEINFO_DISPLAY (s->display);
- TITLEINFO_SCREEN (s);
-
- UNWRAP (ts, s, addSupportedAtoms);
- count = (*s->addSupportedAtoms) (s, atoms, size);
- WRAP (ts, s, addSupportedAtoms, titleinfoAddSupportedAtoms);
-
- if ((size - count) >= 2)
- {
- atoms[count++] = td->visibleNameAtom;
- atoms[count++] = td->wmPidAtom;
- }
- return count;
+void
+TitleinfoScreen::addSupportedAtoms (std::vector<Atom> &atoms)
+{
+ screen->addSupportedAtoms (atoms);
+
+ atoms.push_back (visibleNameAtom);
+ atoms.push_back (wmPidAtom);
}
-*/
void
TitleinfoScreen::handleEvent (XEvent *event)
@@ -280,8 +265,17 @@ TitleinfoScreen::TitleinfoScreen (CompScreen *screen) :
wmPidAtom (XInternAtom (screen->dpy (), "_NET_WM_PID", 0))
{
ScreenInterface::setHandler (screen);
+
+ screen->updateSupportedWmHints ();
};
+TitleinfoScreen::~TitleinfoScreen ()
+{
+ screen->addSupportedAtomsSetEnabled (this, false);
+
+ screen->updateSupportedWmHints ();
+}
+
TitleinfoWindow::TitleinfoWindow (CompWindow *window) :
PluginClassHandler <TitleinfoWindow, CompWindow> (window),
window (window),