Set WM_WINDOW_ROLE for fluxbox windows
This commit is contained in:
parent
7a404e7fbc
commit
36489e4a17
6 changed files with 15 additions and 0 deletions
|
@ -33,6 +33,7 @@ FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
|
||||||
FbTk::Menu(tm, imgctrl),
|
FbTk::Menu(tm, imgctrl),
|
||||||
m_layeritem(fbwindow(), layer) {
|
m_layeritem(fbwindow(), layer) {
|
||||||
|
|
||||||
|
fbwindow().setWindowRole("fluxbox-menu");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbMenu::buttonPressEvent(XButtonEvent &be) {
|
void FbMenu::buttonPressEvent(XButtonEvent &be) {
|
||||||
|
|
|
@ -265,6 +265,13 @@ void FbWindow::setName(const char *name) {
|
||||||
XStoreName(display(), m_window, name);
|
XStoreName(display(), m_window, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FbWindow::setWindowRole(const char *windowRole) {
|
||||||
|
XTextProperty tp;
|
||||||
|
XStringListToTextProperty(const_cast<char **>(&windowRole), 1, &tp);
|
||||||
|
XSetTextProperty(display(), m_window, &tp, XInternAtom(display(), "WM_WINDOW_ROLE", False));
|
||||||
|
XFree(tp.value);
|
||||||
|
}
|
||||||
|
|
||||||
void FbWindow::setEventMask(long mask) {
|
void FbWindow::setEventMask(long mask) {
|
||||||
XSelectInput(display(), m_window, mask);
|
XSelectInput(display(), m_window, mask);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,8 @@ public:
|
||||||
virtual void setBorderWidth(unsigned int size);
|
virtual void setBorderWidth(unsigned int size);
|
||||||
/// set window name ("title")
|
/// set window name ("title")
|
||||||
void setName(const char *name);
|
void setName(const char *name);
|
||||||
|
/// set window role
|
||||||
|
void setWindowRole(const char *windowRole);
|
||||||
void setEventMask(long mask);
|
void setEventMask(long mask);
|
||||||
/// clear window with background pixmap or color
|
/// clear window with background pixmap or color
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
|
@ -262,6 +262,8 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
|
||||||
|
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
|
frame.window.setWindowRole("fluxbox-slit");
|
||||||
|
|
||||||
// attach to theme and root window change signal
|
// attach to theme and root window change signal
|
||||||
join(theme().reconfigSig(), FbTk::MemFun(*this, &Slit::reconfigure));
|
join(theme().reconfigSig(), FbTk::MemFun(*this, &Slit::reconfigure));
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ TextDialog::TextDialog(BScreen &screen,
|
||||||
m_move_x(0),
|
m_move_x(0),
|
||||||
m_move_y(0),
|
m_move_y(0),
|
||||||
m_pixmap(0){
|
m_pixmap(0){
|
||||||
|
setWindowRole("fluxbox-dialog-text");
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,6 +225,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width):
|
||||||
m_resize_lock(false) {
|
m_resize_lock(false) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
|
frame.window.setWindowRole("fluxbox-toolbar");
|
||||||
|
|
||||||
// get this on antialias change
|
// get this on antialias change
|
||||||
m_signal_tracker.join(screen().reconfigureSig(),
|
m_signal_tracker.join(screen().reconfigureSig(),
|
||||||
FbTk::MemFunIgnoreArgs(*this, &Toolbar::reconfigure));
|
FbTk::MemFunIgnoreArgs(*this, &Toolbar::reconfigure));
|
||||||
|
|
Loading…
Reference in a new issue