aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-14 17:34:47 (GMT)
committerfluxgen <fluxgen>2003-09-14 17:34:47 (GMT)
commit56b9ef14babef1f2e6b3ad348abb2609856e52f7 (patch)
treed731d980c6fb4f45547576a9510bc747ed324aed
parent8aa1b8d5b0836daf712bd3cd969a1ec488c9bdfe (diff)
downloadfluxbox-56b9ef14babef1f2e6b3ad348abb2609856e52f7.zip
fluxbox-56b9ef14babef1f2e6b3ad348abb2609856e52f7.tar.bz2
fixed stick pressed pixmap bug
-rw-r--r--src/WinButton.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index 935e3c8..e33b447 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22/// $Id: WinButton.cc,v 1.13 2003/09/14 10:22:45 fluxgen Exp $ 22/// $Id: WinButton.cc,v 1.14 2003/09/14 17:34:47 fluxgen Exp $
23 23
24#include "WinButton.hh" 24#include "WinButton.hh"
25#include "App.hh" 25#include "App.hh"
@@ -57,6 +57,7 @@ void WinButton::drawType() {
57 FbTk::FbWindow::setBackgroundPixmap(m_theme. 57 FbTk::FbWindow::setBackgroundPixmap(m_theme.
58 maximizePressedPixmap(). 58 maximizePressedPixmap().
59 pixmap().drawable()); 59 pixmap().drawable());
60 used = true;
60 } else { 61 } else {
61 // check focus 62 // check focus
62 if (!m_listen_to.isFocused()) { 63 if (!m_listen_to.isFocused()) {
@@ -77,7 +78,6 @@ void WinButton::drawType() {
77 if (used) 78 if (used)
78 FbTk::FbWindow::clear(); 79 FbTk::FbWindow::clear();
79 80
80
81 // if no pixmap was used, use old style 81 // if no pixmap was used, use old style
82 if (!used) { 82 if (!used) {
83 if (gc() == 0) // must have valid graphic context 83 if (gc() == 0) // must have valid graphic context
@@ -114,14 +114,11 @@ void WinButton::drawType() {
114 } 114 }
115 } 115 }
116 116
117 if (used)
118 FbTk::FbWindow::clear();
119
120 } 117 }
121 118
122 if (!used) { 119 if (used) {
123 if (gc() == 0) // must have valid graphic context 120 FbTk::FbWindow::clear();
124 return; 121 } else if (gc() == 0) { // must have valid graphic context
125 FbTk::FbWindow::drawRectangle(gc(), 122 FbTk::FbWindow::drawRectangle(gc(),
126 2, height() - 5, width() - 5, 2); 123 2, height() - 5, width() - 5, 2);
127 } 124 }
@@ -149,9 +146,8 @@ void WinButton::drawType() {
149 } 146 }
150 } 147 }
151 } else { // not stuck and pressed 148 } else { // not stuck and pressed
152
153 if (pressed()) { 149 if (pressed()) {
154 if (m_theme.stickPressedPixmap().pixmap().drawable() == 0) { 150 if (m_theme.stickPressedPixmap().pixmap().drawable() != 0) {
155 FbTk::FbWindow::setBackgroundPixmap(m_theme. 151 FbTk::FbWindow::setBackgroundPixmap(m_theme.
156 stickPressedPixmap(). 152 stickPressedPixmap().
157 pixmap().drawable()); 153 pixmap().drawable());