aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonb <simonb>2006-06-25 14:59:34 (GMT)
committersimonb <simonb>2006-06-25 14:59:34 (GMT)
commitbf9b60833f87a8b328d71dac5879bdf7a0300d6e (patch)
treed7316e26c2595fe1eb4c3ebb88d587421e789e87
parent131d04cf423b36bcfeba351eecc520b94586f729 (diff)
downloadfluxbox_pavel-bf9b60833f87a8b328d71dac5879bdf7a0300d6e.zip
fluxbox_pavel-bf9b60833f87a8b328d71dac5879bdf7a0300d6e.tar.bz2
fix FbPixmap retaining pixmap (that made cache not work properly)
Also small tidy in FbWinFrame.cc
-rw-r--r--ChangeLog4
-rw-r--r--src/FbTk/FbPixmap.cc25
-rw-r--r--src/FbWinFrame.cc5
3 files changed, 16 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 15001b9..1d9f352 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc2: 2Changes for 1.0rc2:
3*06/06/25: 3*06/06/25:
4 * Fix [ 1512046 ] "window.label.unfocus.pixmap" doesn't update (Simon)
5 - FbPixmap::copy was keeping the same pixmap if they had same
6 dimensions. This effectively broke the image cache.
7 FbPixmap.cc
4 * Explicitly map NoSymbol to keycode 0 (thanks Julien Trolet) 8 * Explicitly map NoSymbol to keycode 0 (thanks Julien Trolet)
5 (seems to be assigned to several keycodes) 9 (seems to be assigned to several keycodes)
6 FbTk/KeyUtil.cc 10 FbTk/KeyUtil.cc
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index 46ee97c..3aebd62 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -126,24 +126,17 @@ FbPixmap &FbPixmap::operator = (Pixmap pm) {
126} 126}
127 127
128void FbPixmap::copy(const FbPixmap &the_copy) { 128void FbPixmap::copy(const FbPixmap &the_copy) {
129 129 /* This function previously retained the old pixmap and copied in
130 bool create_new = false; 130 the new contents if they had the same dimensions.
131 131 This broke the image cache, so we don't do that now. If you want to
132 if (the_copy.width() != width() || 132 do it, then you'll need to invalidate all copies of this pixmap in
133 the_copy.height() != height() || 133 the cache */
134 the_copy.depth() != depth() || 134 free();
135 drawable() == 0)
136 create_new = true;
137
138 if (create_new)
139 free();
140 135
141 if (the_copy.drawable() != 0) { 136 if (the_copy.drawable() != 0) {
142 if (create_new) { 137 create(the_copy.drawable(),
143 create(the_copy.drawable(), 138 the_copy.width(), the_copy.height(),
144 the_copy.width(), the_copy.height(), 139 the_copy.depth());
145 the_copy.depth());
146 }
147 140
148 if (drawable()) { 141 if (drawable()) {
149 GContext gc(drawable()); 142 GContext gc(drawable());
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 9e7eedf..eafcb79 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -1204,7 +1204,6 @@ void FbWinFrame::renderTitlebar() {
1204 m_label_unfocused_pm, 1204 m_label_unfocused_pm,
1205 m_label.width(), m_label.height()); 1205 m_label.width(), m_label.height());
1206 1206
1207 renderButtons();
1208} 1207}
1209 1208
1210void FbWinFrame::renderTabContainer() { 1209void FbWinFrame::renderTabContainer() {
@@ -1241,6 +1240,8 @@ void FbWinFrame::renderTabContainer() {
1241 m_labelbutton_active_pm, 1240 m_labelbutton_active_pm,
1242 m_tab_container.width(), m_tab_container.height(), m_tab_container.orientation()); 1241 m_tab_container.width(), m_tab_container.height(), m_tab_container.orientation());
1243 1242
1243 renderButtons();
1244
1244} 1245}
1245 1246
1246void FbWinFrame::applyTitlebar() { 1247void FbWinFrame::applyTitlebar() {
@@ -1591,7 +1592,7 @@ void FbWinFrame::applyActiveLabel(FbTk::TextButton &button) {
1591 button.setAlpha(m_focused?theme().focusedAlpha():theme().unfocusedAlpha()); 1592 button.setAlpha(m_focused?theme().focusedAlpha():theme().unfocusedAlpha());
1592 1593
1593 if (m_labelbutton_active_pm != 0) { 1594 if (m_labelbutton_active_pm != 0) {
1594 button.setBackgroundPixmap(m_labelbutton_active_pm); 1595 button.setBackgroundPixmap(m_labelbutton_active_pm);
1595 } else 1596 } else
1596 button.setBackgroundColor(m_labelbutton_active_color); 1597 button.setBackgroundColor(m_labelbutton_active_color);
1597 1598