minor cleaning
This commit is contained in:
parent
6567f8d1bf
commit
43dfd00e44
2 changed files with 18 additions and 19 deletions
|
@ -27,40 +27,39 @@
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "FbAtoms.hh"
|
#include "FbAtoms.hh"
|
||||||
|
|
||||||
Netizen::Netizen(const BScreen * const scr, Window win):
|
Netizen::Netizen(const BScreen &scr, Window win):
|
||||||
m_screen(scr),
|
m_screen(scr),
|
||||||
m_display(FbTk::App::instance()->display()),
|
m_display(FbTk::App::instance()->display()),
|
||||||
window(win) {
|
m_window(win) {
|
||||||
window = win;
|
|
||||||
|
|
||||||
event.type = ClientMessage;
|
event.type = ClientMessage;
|
||||||
event.xclient.message_type = FbAtoms::instance()->getFluxboxStructureMessagesAtom();
|
event.xclient.message_type = FbAtoms::instance()->getFluxboxStructureMessagesAtom();
|
||||||
event.xclient.display = m_display;
|
event.xclient.display = m_display;
|
||||||
event.xclient.window = window;
|
event.xclient.window = window();
|
||||||
event.xclient.format = 32;
|
event.xclient.format = 32;
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyStartupAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyStartupAtom();
|
||||||
event.xclient.data.l[1] = event.xclient.data.l[2] =
|
event.xclient.data.l[1] = event.xclient.data.l[2] =
|
||||||
event.xclient.data.l[3] = event.xclient.data.l[4] = 0l;
|
event.xclient.data.l[3] = event.xclient.data.l[4] = 0l;
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Netizen::sendWorkspaceCount() {
|
void Netizen::sendWorkspaceCount() {
|
||||||
|
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWorkspaceCountAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWorkspaceCountAtom();
|
||||||
event.xclient.data.l[1] = m_screen->getCount();
|
event.xclient.data.l[1] = m_screen.getCount();
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Netizen::sendCurrentWorkspace() {
|
void Netizen::sendCurrentWorkspace() {
|
||||||
|
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyCurrentWorkspaceAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyCurrentWorkspaceAtom();
|
||||||
event.xclient.data.l[1] = m_screen->getCurrentWorkspaceID();
|
event.xclient.data.l[1] = m_screen.getCurrentWorkspaceID();
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +67,7 @@ void Netizen::sendWindowFocus(Window w) {
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowFocusAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowFocusAtom();
|
||||||
event.xclient.data.l[1] = w;
|
event.xclient.data.l[1] = w;
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +76,7 @@ void Netizen::sendWindowAdd(Window w, unsigned long wkspc) {
|
||||||
event.xclient.data.l[1] = w;
|
event.xclient.data.l[1] = w;
|
||||||
event.xclient.data.l[2] = wkspc;
|
event.xclient.data.l[2] = wkspc;
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
|
|
||||||
event.xclient.data.l[2] = 0l;
|
event.xclient.data.l[2] = 0l;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +86,7 @@ void Netizen::sendWindowDel(Window w) {
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowDelAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowDelAtom();
|
||||||
event.xclient.data.l[1] = w;
|
event.xclient.data.l[1] = w;
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +94,7 @@ void Netizen::sendWindowRaise(Window w) {
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowRaiseAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowRaiseAtom();
|
||||||
event.xclient.data.l[1] = w;
|
event.xclient.data.l[1] = w;
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,9 +102,9 @@ void Netizen::sendWindowLower(Window w) {
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowLowerAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowLowerAtom();
|
||||||
event.xclient.data.l[1] = w;
|
event.xclient.data.l[1] = w;
|
||||||
|
|
||||||
XSendEvent(m_display, window, False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Netizen::sendConfigNotify(XEvent *e) {
|
void Netizen::sendConfigNotify(XEvent *e) {
|
||||||
XSendEvent(m_display, window, False, StructureNotifyMask, e);
|
XSendEvent(m_display, window(), False, StructureNotifyMask, e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,9 @@ class BScreen;
|
||||||
|
|
||||||
class Netizen {
|
class Netizen {
|
||||||
public:
|
public:
|
||||||
Netizen(const BScreen * const scr, Window w);
|
Netizen(const BScreen &scr, Window w);
|
||||||
|
|
||||||
inline Window getWindowID() const { return window; }
|
inline Window window() const { return m_window; }
|
||||||
|
|
||||||
void sendWorkspaceCount();
|
void sendWorkspaceCount();
|
||||||
void sendCurrentWorkspace();
|
void sendCurrentWorkspace();
|
||||||
|
@ -45,9 +45,9 @@ public:
|
||||||
|
|
||||||
void sendConfigNotify(XEvent *xe);
|
void sendConfigNotify(XEvent *xe);
|
||||||
private:
|
private:
|
||||||
const BScreen * const m_screen;
|
const BScreen &m_screen;
|
||||||
Display *m_display; ///< display connection
|
Display *m_display; ///< display connection
|
||||||
Window window;
|
Window m_window;
|
||||||
XEvent event;
|
XEvent event;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue