diff options
author | Vladimir A. Pavlov <pv4@bk.ru> | 2012-10-22 15:39:35 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-12-30 11:27:43 (GMT) |
commit | 36489e4a17df27965ff14b7fd0a9482b4cf47882 (patch) | |
tree | 523ae56bd4f45633cc39cc21c682feb33229723a /src/FbTk | |
parent | 7a404e7fbca7894cdda76f7b0ddfed855a732424 (diff) | |
download | fluxbox-36489e4a17df27965ff14b7fd0a9482b4cf47882.zip fluxbox-36489e4a17df27965ff14b7fd0a9482b4cf47882.tar.bz2 |
Set WM_WINDOW_ROLE for fluxbox windows
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/FbWindow.cc | 7 | ||||
-rw-r--r-- | src/FbTk/FbWindow.hh | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 8362733..257447f 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -265,6 +265,13 @@ void FbWindow::setName(const char *name) { | |||
265 | XStoreName(display(), m_window, name); | 265 | XStoreName(display(), m_window, name); |
266 | } | 266 | } |
267 | 267 | ||
268 | void FbWindow::setWindowRole(const char *windowRole) { | ||
269 | XTextProperty tp; | ||
270 | XStringListToTextProperty(const_cast<char **>(&windowRole), 1, &tp); | ||
271 | XSetTextProperty(display(), m_window, &tp, XInternAtom(display(), "WM_WINDOW_ROLE", False)); | ||
272 | XFree(tp.value); | ||
273 | } | ||
274 | |||
268 | void FbWindow::setEventMask(long mask) { | 275 | void FbWindow::setEventMask(long mask) { |
269 | XSelectInput(display(), m_window, mask); | 276 | XSelectInput(display(), m_window, mask); |
270 | } | 277 | } |
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 9d335fa..3e1c05b 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh | |||
@@ -87,6 +87,8 @@ public: | |||
87 | virtual void setBorderWidth(unsigned int size); | 87 | virtual void setBorderWidth(unsigned int size); |
88 | /// set window name ("title") | 88 | /// set window name ("title") |
89 | void setName(const char *name); | 89 | void setName(const char *name); |
90 | /// set window role | ||
91 | void setWindowRole(const char *windowRole); | ||
90 | void setEventMask(long mask); | 92 | void setEventMask(long mask); |
91 | /// clear window with background pixmap or color | 93 | /// clear window with background pixmap or color |
92 | virtual void clear(); | 94 | virtual void clear(); |