aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorsimonb <simonb>2005-04-26 04:18:10 (GMT)
committersimonb <simonb>2005-04-26 04:18:10 (GMT)
commite57a30f664f7fb2660967f40db2c10759c2e9e4f (patch)
treecab24eb65d78ccf35b9bdb182adfcbd971d6f66f /src/FbTk
parent1c2f92a3d2288b1cae9500110a72173506a18072 (diff)
downloadfluxbox-e57a30f664f7fb2660967f40db2c10759c2e9e4f.zip
fluxbox-e57a30f664f7fb2660967f40db2c10759c2e9e4f.tar.bz2
fix systray client sizing
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbWindow.cc24
-rw-r--r--src/FbTk/FbWindow.hh2
2 files changed, 26 insertions, 0 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index acdc7c1..e00fa14 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -555,6 +555,30 @@ void FbWindow::create(Window parent, int x, int y,
555 FbWindow::setBackgroundColor(Color("gray", screenNumber())); 555 FbWindow::setBackgroundColor(Color("gray", screenNumber()));
556} 556}
557 557
558
559void FbWindow::sendConfigureNotify(int x, int y,
560 unsigned int width, unsigned int height) {
561 Display *disp = FbTk::App::instance()->display();
562 XEvent event;
563 event.type = ConfigureNotify;
564
565 event.xconfigure.display = disp;
566 event.xconfigure.event = window();
567 event.xconfigure.window = window();
568 event.xconfigure.x = x;
569 event.xconfigure.y = y;
570 event.xconfigure.width = width;
571 event.xconfigure.height = height;
572 //!! TODO
573 event.xconfigure.border_width = 1;
574 //!! TODO
575 event.xconfigure.above = None;
576 event.xconfigure.override_redirect = false;
577
578 XSendEvent(disp, window(), False, StructureNotifyMask, &event);
579
580}
581
558bool operator == (Window win, const FbWindow &fbwin) { 582bool operator == (Window win, const FbWindow &fbwin) {
559 return win == fbwin.window(); 583 return win == fbwin.window();
560} 584}
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index ff1b42e..f02c63e 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -186,6 +186,8 @@ public:
186 186
187 void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; } 187 void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; }
188 188
189 void sendConfigureNotify(int x, int y, unsigned int width, unsigned int height);
190
189protected: 191protected:
190 /// creates a window with x window client (m_window = client) 192 /// creates a window with x window client (m_window = client)
191 explicit FbWindow(Window client); 193 explicit FbWindow(Window client);