From 43dfd00e44e9f4502e912045bbf3eaf59f6561ce Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 10 May 2003 16:55:11 +0000 Subject: minor cleaning --- src/Netizen.cc | 29 ++++++++++++++--------------- src/Netizen.hh | 8 ++++---- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/Netizen.cc b/src/Netizen.cc index c9d26ef..8d85d1e 100644 --- a/src/Netizen.cc +++ b/src/Netizen.cc @@ -27,40 +27,39 @@ #include "Screen.hh" #include "FbAtoms.hh" -Netizen::Netizen(const BScreen * const scr, Window win): +Netizen::Netizen(const BScreen &scr, Window win): m_screen(scr), m_display(FbTk::App::instance()->display()), - window(win) { - window = win; + m_window(win) { event.type = ClientMessage; event.xclient.message_type = FbAtoms::instance()->getFluxboxStructureMessagesAtom(); event.xclient.display = m_display; - event.xclient.window = window; + event.xclient.window = window(); event.xclient.format = 32; event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyStartupAtom(); event.xclient.data.l[1] = event.xclient.data.l[2] = 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() { 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() { 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[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[2] = wkspc; - XSendEvent(m_display, window, False, NoEventMask, &event); + XSendEvent(m_display, window(), False, NoEventMask, &event); 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[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[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[1] = w; - XSendEvent(m_display, window, False, NoEventMask, &event); + XSendEvent(m_display, window(), False, NoEventMask, &event); } void Netizen::sendConfigNotify(XEvent *e) { - XSendEvent(m_display, window, False, StructureNotifyMask, e); + XSendEvent(m_display, window(), False, StructureNotifyMask, e); } diff --git a/src/Netizen.hh b/src/Netizen.hh index d872ebe..c03f97e 100644 --- a/src/Netizen.hh +++ b/src/Netizen.hh @@ -30,9 +30,9 @@ class BScreen; class Netizen { 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 sendCurrentWorkspace(); @@ -45,9 +45,9 @@ public: void sendConfigNotify(XEvent *xe); private: - const BScreen * const m_screen; + const BScreen &m_screen; Display *m_display; ///< display connection - Window window; + Window m_window; XEvent event; }; -- cgit v0.11.2