diff --git a/src/FbMenu.cc b/src/FbMenu.cc index dffd07cd..28710423 100644 --- a/src/FbMenu.cc +++ b/src/FbMenu.cc @@ -33,6 +33,7 @@ FbMenu::FbMenu(FbTk::ThemeProxy &tm, FbTk::Menu(tm, imgctrl), m_layeritem(fbwindow(), layer) { + fbwindow().setWindowRole("fluxbox-menu"); } void FbMenu::buttonPressEvent(XButtonEvent &be) { diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 83627335..257447fd 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -265,6 +265,13 @@ void FbWindow::setName(const char *name) { XStoreName(display(), m_window, name); } +void FbWindow::setWindowRole(const char *windowRole) { + XTextProperty tp; + XStringListToTextProperty(const_cast(&windowRole), 1, &tp); + XSetTextProperty(display(), m_window, &tp, XInternAtom(display(), "WM_WINDOW_ROLE", False)); + XFree(tp.value); +} + void FbWindow::setEventMask(long mask) { XSelectInput(display(), m_window, mask); } diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 9d335fa5..3e1c05b1 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh @@ -87,6 +87,8 @@ public: virtual void setBorderWidth(unsigned int size); /// set window name ("title") void setName(const char *name); + /// set window role + void setWindowRole(const char *windowRole); void setEventMask(long mask); /// clear window with background pixmap or color virtual void clear(); diff --git a/src/Slit.cc b/src/Slit.cc index 738a81a6..7d6b1efd 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -262,6 +262,8 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename) _FB_USES_NLS; + frame.window.setWindowRole("fluxbox-slit"); + // attach to theme and root window change signal join(theme().reconfigSig(), FbTk::MemFun(*this, &Slit::reconfigure)); diff --git a/src/TextDialog.cc b/src/TextDialog.cc index f86c1e69..d27a5511 100644 --- a/src/TextDialog.cc +++ b/src/TextDialog.cc @@ -50,6 +50,7 @@ TextDialog::TextDialog(BScreen &screen, m_move_x(0), m_move_y(0), m_pixmap(0){ + setWindowRole("fluxbox-dialog-text"); init(); } diff --git a/src/Toolbar.cc b/src/Toolbar.cc index f46b9e9c..5f4cc807 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -225,6 +225,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width): m_resize_lock(false) { _FB_USES_NLS; + frame.window.setWindowRole("fluxbox-toolbar"); + // get this on antialias change m_signal_tracker.join(screen().reconfigureSig(), FbTk::MemFunIgnoreArgs(*this, &Toolbar::reconfigure));