diff options
author | simonb <simonb> | 2005-04-27 17:57:40 (GMT) |
---|---|---|
committer | simonb <simonb> | 2005-04-27 17:57:40 (GMT) |
commit | c0f725806323e370d8eda922e680a0b17db17175 (patch) | |
tree | 6ee410745d0e13598e7a8eced39a37495d985ff5 | |
parent | 690030444b984e6b348284ae3c88671ee65a530b (diff) | |
download | fluxbox_paul-c0f725806323e370d8eda922e680a0b17db17175.zip fluxbox_paul-c0f725806323e370d8eda922e680a0b17db17175.tar.bz2 |
fix background setting + initialisation
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/FbTk/FbWindow.cc | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.13 | 2 | Changes for 0.9.13 |
3 | *05/04/27: | 3 | *05/04/27: |
4 | * Fix some initialisation, plus setting background too much (Simon) | ||
5 | FbWindow.cc | ||
4 | * Add some extremely basic handling for icon pixmaps that aren't | 6 | * Add some extremely basic handling for icon pixmaps that aren't |
5 | the same depth as the screen (treat all as 1-bit, easy to handle) | 7 | the same depth as the screen (treat all as 1-bit, easy to handle) |
6 | (Simon) | 8 | (Simon) |
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 2863b3a..5a6417f 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -46,7 +46,7 @@ namespace FbTk { | |||
46 | 46 | ||
47 | FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), | 47 | FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), |
48 | m_width(0), m_height(0), m_border_width(0), m_depth(0), m_destroy(true), | 48 | m_width(0), m_height(0), m_border_width(0), m_depth(0), m_destroy(true), |
49 | m_lastbg_pm(0), m_renderer(0) { | 49 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0) { |
50 | 50 | ||
51 | } | 51 | } |
52 | 52 | ||
@@ -57,6 +57,7 @@ FbWindow::FbWindow(const FbWindow& the_copy):FbDrawable(), | |||
57 | m_width(the_copy.width()), m_height(the_copy.height()), | 57 | m_width(the_copy.width()), m_height(the_copy.height()), |
58 | m_border_width(the_copy.borderWidth()), | 58 | m_border_width(the_copy.borderWidth()), |
59 | m_depth(the_copy.depth()), m_destroy(true), | 59 | m_depth(the_copy.depth()), m_destroy(true), |
60 | m_lastbg_color_set(false), m_lastbg_color(0), | ||
60 | m_lastbg_pm(0), m_renderer(the_copy.m_renderer) { | 61 | m_lastbg_pm(0), m_renderer(the_copy.m_renderer) { |
61 | the_copy.m_window = 0; | 62 | the_copy.m_window = 0; |
62 | } | 63 | } |
@@ -91,8 +92,7 @@ FbWindow::FbWindow(const FbWindow &parent, | |||
91 | m_parent(&parent), | 92 | m_parent(&parent), |
92 | m_screen_num(parent.screenNumber()), | 93 | m_screen_num(parent.screenNumber()), |
93 | m_destroy(true), | 94 | m_destroy(true), |
94 | m_lastbg_color_set(false), | 95 | m_lastbg_color_set(false), m_lastbg_color(0), |
95 | m_lastbg_color(0x42), | ||
96 | m_lastbg_pm(0), m_renderer(0) { | 96 | m_lastbg_pm(0), m_renderer(0) { |
97 | 97 | ||
98 | create(parent.window(), x, y, width, height, eventmask, | 98 | create(parent.window(), x, y, width, height, eventmask, |
@@ -109,6 +109,7 @@ FbWindow::FbWindow(Window client):FbDrawable(), m_parent(0), | |||
109 | m_border_width(0), | 109 | m_border_width(0), |
110 | m_depth(0), | 110 | m_depth(0), |
111 | m_destroy(false), // don't destroy this window | 111 | m_destroy(false), // don't destroy this window |
112 | m_lastbg_color_set(false), m_lastbg_color(0), | ||
112 | m_lastbg_pm(0), m_renderer(0) { | 113 | m_lastbg_pm(0), m_renderer(0) { |
113 | 114 | ||
114 | setNew(client); | 115 | setNew(client); |
@@ -153,6 +154,9 @@ void FbWindow::updateBackground(bool only_if_alpha) { | |||
153 | unsigned char alpha = 255; | 154 | unsigned char alpha = 255; |
154 | bool free_newbg = false; | 155 | bool free_newbg = false; |
155 | 156 | ||
157 | if (m_lastbg_pm == None && !m_lastbg_color_set) | ||
158 | return; | ||
159 | |||
156 | if (m_transparent.get() != 0) | 160 | if (m_transparent.get() != 0) |
157 | alpha = m_transparent->alpha(); | 161 | alpha = m_transparent->alpha(); |
158 | 162 | ||