summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-04 20:50:15 (GMT)
committerfluxgen <fluxgen>2003-05-04 20:50:15 (GMT)
commit1a4c4052b0ffc933ced68ec940fe41d54f9b6363 (patch)
tree738503249851399443c86f4c5ecb436e8fd43287 /src
parentb10dc8434b4faa7c4b9be82c00f1c4e141eab0c4 (diff)
downloadfluxbox_lack-1a4c4052b0ffc933ced68ec940fe41d54f9b6363.zip
fluxbox_lack-1a4c4052b0ffc933ced68ec940fe41d54f9b6363.tar.bz2
fixed bug in slit background theme
Diffstat (limited to 'src')
-rw-r--r--src/Slit.cc61
1 files changed, 31 insertions, 30 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index f55fc5b..bc54c5d 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Slit.cc,v 1.44 2003/05/01 15:35:24 rathnor Exp $ 25// $Id: Slit.cc,v 1.45 2003/05/04 20:50:15 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -32,7 +32,7 @@
32#endif // _GNU_SOURCE 32#endif // _GNU_SOURCE
33 33
34#ifdef HAVE_CONFIG_H 34#ifdef HAVE_CONFIG_H
35#include "../config.h" 35#include "config.h"
36#endif // HAVE_CONFIG_H 36#endif // HAVE_CONFIG_H
37 37
38#include "i18n.hh" 38#include "i18n.hh"
@@ -244,7 +244,10 @@ class SlitTheme:public FbTk::Theme {
244public: 244public:
245 explicit SlitTheme(Slit &slit):FbTk::Theme(slit.screen().getScreenNumber()), 245 explicit SlitTheme(Slit &slit):FbTk::Theme(slit.screen().getScreenNumber()),
246 m_slit(slit), 246 m_slit(slit),
247 m_texture(*this, "slit", "Slit") { } 247 m_texture(*this, "slit", "Slit") {
248 // default texture type
249 m_texture->setType(FbTk::Texture::SOLID);
250 }
248 void reconfigTheme() { 251 void reconfigTheme() {
249 m_slit.reconfigure(); 252 m_slit.reconfigure();
250 } 253 }
@@ -560,23 +563,21 @@ void Slit::reconfigure() {
560 int num_windows = 0; 563 int num_windows = 0;
561 const int bevel_width = screen().rootTheme().bevelWidth(); 564 const int bevel_width = screen().rootTheme().bevelWidth();
562 switch (direction()) { 565 switch (direction()) {
563 case VERTICAL: 566 case VERTICAL: {
564 { 567 SlitClients::iterator it = clientList.begin();
565 SlitClients::iterator it = clientList.begin(); 568 SlitClients::iterator it_end = clientList.end();
566 SlitClients::iterator it_end = clientList.end(); 569 for (; it != it_end; ++it) {
567 for (; it != it_end; ++it) { 570 //client created window?
568 //client created window? 571 if ((*it)->window != None && (*it)->visible) {
569 if ((*it)->window != None && (*it)->visible) { 572 num_windows++;
570 num_windows++; 573 frame.height += (*it)->height + bevel_width;
571 frame.height += (*it)->height +
572 bevel_width;
573 574
574 //frame width < client window? 575 //frame width < client window?
575 if (frame.width < (*it)->width) 576 if (frame.width < (*it)->width)
576 frame.width = (*it)->width; 577 frame.width = (*it)->width;
577 }
578 } 578 }
579 } 579 }
580 }
580 581
581 if (frame.width < 1) 582 if (frame.width < 1)
582 frame.width = 1; 583 frame.width = 1;
@@ -590,21 +591,21 @@ void Slit::reconfigure() {
590 591
591 break; 592 break;
592 593
593 case HORIZONTAL: 594 case HORIZONTAL: {
594 { 595 SlitClients::iterator it = clientList.begin();
595 SlitClients::iterator it = clientList.begin(); 596 SlitClients::iterator it_end = clientList.end();
596 SlitClients::iterator it_end = clientList.end(); 597 for (; it != it_end; ++it) {
597 for (; it != it_end; ++it) { 598 //client created window?
598 //client created window? 599 if ((*it)->window != None && (*it)->visible) {
599 if ((*it)->window != None && (*it)->visible) { 600 num_windows++;
600 num_windows++; 601 frame.width += (*it)->width + bevel_width;
601 frame.width += (*it)->width + bevel_width; 602 //frame height < client height?
602 //frame height < client height? 603 if (frame.height < (*it)->height)
603 if (frame.height < (*it)->height) 604 frame.height = (*it)->height;
604 frame.height = (*it)->height;
605 }
606 } 605 }
607 } 606 }
607 break;
608 }
608 609
609 if (frame.width < 1) 610 if (frame.width < 1)
610 frame.width = 1; 611 frame.width = 1;