summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2006-05-13 16:22:30 (GMT)
committerfluxgen <fluxgen>2006-05-13 16:22:30 (GMT)
commit4d48f7576bb73e3a3f4c1378249389ac0040652d (patch)
treea5196a56a1b1280ed2969b059448700623503608
parent35934ff23e022aedbf6f048ac0c0f4c02f97bc2d (diff)
downloadfluxbox_lack-4d48f7576bb73e3a3f4c1378249389ac0040652d.zip
fluxbox_lack-4d48f7576bb73e3a3f4c1378249389ac0040652d.tar.bz2
added one more render option for renderButton, force render of focused. Listening to attention signal from Window.
-rw-r--r--src/IconbarTool.cc26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 82fdf26..a0e0beb 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -596,6 +596,14 @@ void IconbarTool::update(FbTk::Subject *subj) {
596 596
597 return; 597 return;
598 598
599 } else if (subj == &(winsubj->win().attentionSig())) {
600 // render with titlebar focus, on attention
601 IconButton *button = findButton(winsubj->win());
602 if (button) {
603 renderButton(*button, true,
604 winsubj->win().frame().focused() ? 1 : 0);
605 }
606 return;
599 } else { 607 } else {
600 // signal not handled 608 // signal not handled
601 return; 609 return;
@@ -659,14 +667,14 @@ IconButton *IconbarTool::findButton(FluxboxWindow &win) {
659 667
660 return 0; 668 return 0;
661} 669}
662 670/*
663void IconbarTool::renderWindow(FluxboxWindow &win) { 671void IconbarTool::renderWindow(FluxboxWindow &win) {
664 IconButton *button = findButton(win); 672 IconButton *button = findButton(win);
665 if (button == 0) 673 if (button == 0)
666 return; 674 return;
667 renderButton(*button); 675 renderButton(*button);
668} 676}
669 677*/
670void IconbarTool::updateSizing() { 678void IconbarTool::updateSizing() {
671 m_icon_container.setBorderWidth(m_theme.border().width()); 679 m_icon_container.setBorderWidth(m_theme.border().width());
672 680
@@ -771,7 +779,8 @@ void IconbarTool::renderTheme() {
771 } 779 }
772} 780}
773 781
774void IconbarTool::renderButton(IconButton &button, bool clear) { 782void IconbarTool::renderButton(IconButton &button, bool clear,
783 int focusOption) {
775 784
776 button.setPixmap(*m_rc_use_pixmap); 785 button.setPixmap(*m_rc_use_pixmap);
777 button.setAlpha(m_alpha); 786 button.setAlpha(m_alpha);
@@ -788,8 +797,13 @@ void IconbarTool::renderButton(IconButton &button, bool clear) {
788// button.height() != m_icon_container.back()->height()); 797// button.height() != m_icon_container.back()->height());
789 } 798 }
790 799
791 if (button.win().isFocused()) { // focused texture 800 if (focusOption == 1 ||
792 m_icon_container.setSelected(m_icon_container.find(&button)); 801 (focusOption == -1 &&
802 button.win().isFocused())) {
803
804 // focused texture
805 if (button.win().isFocused())
806 m_icon_container.setSelected(m_icon_container.find(&button));
793 807
794 button.setGC(m_theme.focusedText().textGC()); 808 button.setGC(m_theme.focusedText().textGC());
795 button.setFont(m_theme.focusedText().font()); 809 button.setFont(m_theme.focusedText().font());
@@ -891,7 +905,7 @@ void IconbarTool::addWindow(FluxboxWindow &win) {
891 win.dieSig().attach(this); 905 win.dieSig().attach(this);
892 win.workspaceSig().attach(this); 906 win.workspaceSig().attach(this);
893 win.stateSig().attach(this); 907 win.stateSig().attach(this);
894 908 win.attentionSig().attach(this);
895} 909}
896 910
897void IconbarTool::updateIcons() { 911void IconbarTool::updateIcons() {