aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir A. Pavlov <pv4@bk.ru>2012-10-22 15:39:35 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-12-30 11:27:43 (GMT)
commit36489e4a17df27965ff14b7fd0a9482b4cf47882 (patch)
tree523ae56bd4f45633cc39cc21c682feb33229723a /src
parent7a404e7fbca7894cdda76f7b0ddfed855a732424 (diff)
downloadfluxbox_pavel-36489e4a17df27965ff14b7fd0a9482b4cf47882.zip
fluxbox_pavel-36489e4a17df27965ff14b7fd0a9482b4cf47882.tar.bz2
Set WM_WINDOW_ROLE for fluxbox windows
Diffstat (limited to 'src')
-rw-r--r--src/FbMenu.cc1
-rw-r--r--src/FbTk/FbWindow.cc7
-rw-r--r--src/FbTk/FbWindow.hh2
-rw-r--r--src/Slit.cc2
-rw-r--r--src/TextDialog.cc1
-rw-r--r--src/Toolbar.cc2
6 files changed, 15 insertions, 0 deletions
diff --git a/src/FbMenu.cc b/src/FbMenu.cc
index dffd07c..2871042 100644
--- a/src/FbMenu.cc
+++ b/src/FbMenu.cc
@@ -33,6 +33,7 @@ FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
33 FbTk::Menu(tm, imgctrl), 33 FbTk::Menu(tm, imgctrl),
34 m_layeritem(fbwindow(), layer) { 34 m_layeritem(fbwindow(), layer) {
35 35
36 fbwindow().setWindowRole("fluxbox-menu");
36} 37}
37 38
38void FbMenu::buttonPressEvent(XButtonEvent &be) { 39void FbMenu::buttonPressEvent(XButtonEvent &be) {
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
268void 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
268void FbWindow::setEventMask(long mask) { 275void 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();
diff --git a/src/Slit.cc b/src/Slit.cc
index 738a81a..7d6b1ef 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -262,6 +262,8 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
262 262
263 _FB_USES_NLS; 263 _FB_USES_NLS;
264 264
265 frame.window.setWindowRole("fluxbox-slit");
266
265 // attach to theme and root window change signal 267 // attach to theme and root window change signal
266 join(theme().reconfigSig(), FbTk::MemFun(*this, &Slit::reconfigure)); 268 join(theme().reconfigSig(), FbTk::MemFun(*this, &Slit::reconfigure));
267 269
diff --git a/src/TextDialog.cc b/src/TextDialog.cc
index f86c1e6..d27a551 100644
--- a/src/TextDialog.cc
+++ b/src/TextDialog.cc
@@ -50,6 +50,7 @@ TextDialog::TextDialog(BScreen &screen,
50 m_move_x(0), 50 m_move_x(0),
51 m_move_y(0), 51 m_move_y(0),
52 m_pixmap(0){ 52 m_pixmap(0){
53 setWindowRole("fluxbox-dialog-text");
53 init(); 54 init();
54} 55}
55 56
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index f46b9e9..5f4cc80 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -225,6 +225,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width):
225 m_resize_lock(false) { 225 m_resize_lock(false) {
226 _FB_USES_NLS; 226 _FB_USES_NLS;
227 227
228 frame.window.setWindowRole("fluxbox-toolbar");
229
228 // get this on antialias change 230 // get this on antialias change
229 m_signal_tracker.join(screen().reconfigureSig(), 231 m_signal_tracker.join(screen().reconfigureSig(),
230 FbTk::MemFunIgnoreArgs(*this, &Toolbar::reconfigure)); 232 FbTk::MemFunIgnoreArgs(*this, &Toolbar::reconfigure));