aboutsummaryrefslogtreecommitdiff
path: root/src/SystemTray.cc
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/SystemTray.cc
parent1c2f92a3d2288b1cae9500110a72173506a18072 (diff)
downloadfluxbox-e57a30f664f7fb2660967f40db2c10759c2e9e4f.zip
fluxbox-e57a30f664f7fb2660967f40db2c10759c2e9e4f.tar.bz2
fix systray client sizing
Diffstat (limited to 'src/SystemTray.cc')
-rw-r--r--src/SystemTray.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/SystemTray.cc b/src/SystemTray.cc
index c296efb..1aced06 100644
--- a/src/SystemTray.cc
+++ b/src/SystemTray.cc
@@ -326,7 +326,6 @@ void SystemTray::removeClient(Window win) {
326 326
327void SystemTray::exposeEvent(XExposeEvent &event) { 327void SystemTray::exposeEvent(XExposeEvent &event) {
328 m_window.clear(); 328 m_window.clear();
329 update(0);
330} 329}
331 330
332void SystemTray::handleEvent(XEvent &event) { 331void SystemTray::handleEvent(XEvent &event) {
@@ -350,6 +349,8 @@ void SystemTray::handleEvent(XEvent &event) {
350 // copy of position 349 // copy of position
351 (*it)->moveResize((*it)->x(), (*it)->y(), 350 (*it)->moveResize((*it)->x(), (*it)->y(),
352 (*it)->width(), (*it)->height()); 351 (*it)->width(), (*it)->height());
352 // this was why gaim wasn't centring the icon
353 (*it)->sendConfigureNotify(0, 0, (*it)->width(), (*it)->height());
353 } 354 }
354 // so toolbar know that we changed size 355 // so toolbar know that we changed size
355 resizeSig().notify(); 356 resizeSig().notify();
@@ -359,19 +360,23 @@ void SystemTray::handleEvent(XEvent &event) {
359} 360}
360 361
361void SystemTray::rearrangeClients() { 362void SystemTray::rearrangeClients() {
363 const unsigned int h = height();
364 const unsigned int bw = m_theme.border().width();
365 int final_size = m_clients.size()*h + bw;
366 resize(final_size, h);
367 update(0);
368
362 // move and resize clients 369 // move and resize clients
363 ClientList::iterator client_it = m_clients.begin(); 370 ClientList::iterator client_it = m_clients.begin();
364 ClientList::iterator client_it_end = m_clients.end(); 371 ClientList::iterator client_it_end = m_clients.end();
365 int next_x = 0; 372 int next_x = bw;
366 const unsigned int h = height();
367 const unsigned int b = m_theme.border().width();
368 for (; client_it != client_it_end; 373 for (; client_it != client_it_end;
369 ++client_it, next_x += h - 2 * b) { 374 ++client_it, next_x += h+bw) {
370 (*client_it)->moveResize(next_x, b, h - b, h - b); 375 (*client_it)->moveResize(next_x, bw, h, h);
376 (*client_it)->sendConfigureNotify(next_x, bw, h, h);
371 } 377 }
372 378
373 resize(next_x, height()); 379 client_it = m_clients.begin();
374 update(0);
375} 380}
376 381
377void SystemTray::removeAllClients() { 382void SystemTray::removeAllClients() {