diff options
Diffstat (limited to 'src/SystemTray.cc')
-rw-r--r-- | src/SystemTray.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/SystemTray.cc b/src/SystemTray.cc index e9adeae..ea3e0bb 100644 --- a/src/SystemTray.cc +++ b/src/SystemTray.cc | |||
@@ -36,7 +36,15 @@ | |||
36 | 36 | ||
37 | #include <string> | 37 | #include <string> |
38 | 38 | ||
39 | using namespace std; | 39 | using std::string; |
40 | |||
41 | #ifdef DEBUG | ||
42 | #include <iostream> | ||
43 | using std::cerr; | ||
44 | using std::endl; | ||
45 | using std::hex; | ||
46 | using std::dec; | ||
47 | #endif // DEBUG | ||
40 | 48 | ||
41 | /// helper class for tray windows, so we dont call XDestroyWindow | 49 | /// helper class for tray windows, so we dont call XDestroyWindow |
42 | class TrayWindow: public FbTk::FbWindow { | 50 | class TrayWindow: public FbTk::FbWindow { |
@@ -118,7 +126,7 @@ SystemTray::SystemTray(const FbTk::FbWindow& parent, ButtonTheme& theme, BScreen | |||
118 | // setup atom name to _NET_SYSTEM_TRAY_S<screen number> | 126 | // setup atom name to _NET_SYSTEM_TRAY_S<screen number> |
119 | char intbuff[16]; | 127 | char intbuff[16]; |
120 | sprintf(intbuff, "%d", m_window.screenNumber()); | 128 | sprintf(intbuff, "%d", m_window.screenNumber()); |
121 | std::string atom_name("_NET_SYSTEM_TRAY_S"); | 129 | string atom_name("_NET_SYSTEM_TRAY_S"); |
122 | atom_name += intbuff; // append number | 130 | atom_name += intbuff; // append number |
123 | 131 | ||
124 | // get selection owner and see if it's free | 132 | // get selection owner and see if it's free |
@@ -240,7 +248,7 @@ bool SystemTray::clientMessage(const XClientMessageEvent &event) { | |||
240 | 248 | ||
241 | int type = event.data.l[1]; | 249 | int type = event.data.l[1]; |
242 | if (type == SYSTEM_TRAY_REQUEST_DOCK) { | 250 | if (type == SYSTEM_TRAY_REQUEST_DOCK) { |
243 | #ifndef DEBUG | 251 | #ifdef DEBUG |
244 | cerr<<"SystemTray::clientMessage(const XClientMessageEvent): SYSTEM_TRAY_REQUEST_DOCK"<<endl; | 252 | cerr<<"SystemTray::clientMessage(const XClientMessageEvent): SYSTEM_TRAY_REQUEST_DOCK"<<endl; |
245 | cerr<<"window = event.data.l[2] = "<<event.data.l[2]<<endl; | 253 | cerr<<"window = event.data.l[2] = "<<event.data.l[2]<<endl; |
246 | #endif // DEBUG | 254 | #endif // DEBUG |
@@ -353,7 +361,7 @@ void SystemTray::handleEvent(XEvent &event) { | |||
353 | static_cast<unsigned int>(event.xconfigure.height) != (*it)->height()) { | 361 | static_cast<unsigned int>(event.xconfigure.height) != (*it)->height()) { |
354 | // the position might differ so we update from our local | 362 | // the position might differ so we update from our local |
355 | // copy of position | 363 | // copy of position |
356 | XMoveResizeWindow(FbTk::App::instance()->display(), (*it)->window(), | 364 | XMoveResizeWindow(FbTk::App::instance()->display(), (*it)->window(), |
357 | (*it)->x(), (*it)->y(), | 365 | (*it)->x(), (*it)->y(), |
358 | (*it)->width(), (*it)->height()); | 366 | (*it)->width(), (*it)->height()); |
359 | 367 | ||