diff options
author | simonb <simonb> | 2006-05-22 15:09:21 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-05-22 15:09:21 (GMT) |
commit | 4afe5499b20ca321f2ead44e46b14f9df2db5339 (patch) | |
tree | 9f3b9f20a14ef3cdbc8483ba5ae7db8940aa69a3 | |
parent | d508292a578f0bee4e96b232bf7d8f5180a07296 (diff) | |
download | fluxbox_pavel-4afe5499b20ca321f2ead44e46b14f9df2db5339.zip fluxbox_pavel-4afe5499b20ca321f2ead44e46b14f9df2db5339.tar.bz2 |
fix parentrelative background, and some tidying
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/FbTk/App.cc | 3 | ||||
-rw-r--r-- | src/FbTk/FbString.cc | 8 | ||||
-rw-r--r-- | src/FbTk/FbWindow.cc | 8 | ||||
-rw-r--r-- | src/main.cc | 2 |
5 files changed, 18 insertions, 8 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.16: | 2 | Changes for 0.9.16: |
3 | *06/05/22: | ||
4 | * Fix handling of ParentRelative background (Simon) | ||
5 | FbWindow.cc | ||
3 | *06/05/21: | 6 | *06/05/21: |
4 | * Fix build on cygwin (iconv const error) (Simon) | 7 | * Fix build on cygwin (iconv const error) (Simon) |
5 | FbTk/FbString.cc | 8 | FbTk/FbString.cc |
diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc index 0b773c4..d60f95b 100644 --- a/src/FbTk/App.cc +++ b/src/FbTk/App.cc | |||
@@ -59,8 +59,7 @@ App::~App() { | |||
59 | 59 | ||
60 | Font::shutdown(); | 60 | Font::shutdown(); |
61 | Image::shutdown(); | 61 | Image::shutdown(); |
62 | FbStringUtil::shutdown(); | 62 | |
63 | |||
64 | XCloseDisplay(m_display); | 63 | XCloseDisplay(m_display); |
65 | m_display = 0; | 64 | m_display = 0; |
66 | } | 65 | } |
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index c11b11d..26eb058 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc | |||
@@ -56,10 +56,8 @@ static int iconv_convs[CONVSIZE]; | |||
56 | 56 | ||
57 | /// Initialise all of the iconv conversion descriptors | 57 | /// Initialise all of the iconv conversion descriptors |
58 | void init() { | 58 | void init() { |
59 | static bool s_init = false; | 59 | if (iconv_convs != 0) |
60 | if (s_init) | ||
61 | return; | 60 | return; |
62 | s_init = true; | ||
63 | 61 | ||
64 | iconv_convs = new iconv_t[CONVSIZE]; | 62 | iconv_convs = new iconv_t[CONVSIZE]; |
65 | 63 | ||
@@ -92,6 +90,8 @@ void init() { | |||
92 | } | 90 | } |
93 | 91 | ||
94 | void shutdown() { | 92 | void shutdown() { |
93 | if (iconv_convs == 0) | ||
94 | return; | ||
95 | #ifdef HAVE_ICONV | 95 | #ifdef HAVE_ICONV |
96 | for (int i=0; i < CONVSIZE; ++i) | 96 | for (int i=0; i < CONVSIZE; ++i) |
97 | if (iconv_convs[i] != (iconv_t)(-1)) | 97 | if (iconv_convs[i] != (iconv_t)(-1)) |
@@ -99,7 +99,7 @@ void shutdown() { | |||
99 | #endif // HAVE_ICONV | 99 | #endif // HAVE_ICONV |
100 | 100 | ||
101 | delete[] iconv_convs; | 101 | delete[] iconv_convs; |
102 | 102 | iconv_convs = 0; | |
103 | } | 103 | } |
104 | 104 | ||
105 | 105 | ||
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 2c34fa1..b996edc 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -249,13 +249,19 @@ void FbWindow::setEventMask(long mask) { | |||
249 | 249 | ||
250 | void FbWindow::clear() { | 250 | void FbWindow::clear() { |
251 | XClearWindow(display(), m_window); | 251 | XClearWindow(display(), m_window); |
252 | if (m_lastbg_pm == ParentRelative && m_renderer) | ||
253 | m_renderer->renderForeground(*this, *this); | ||
254 | |||
252 | } | 255 | } |
253 | 256 | ||
254 | void FbWindow::clearArea(int x, int y, | 257 | void FbWindow::clearArea(int x, int y, |
255 | unsigned int width, unsigned int height, | 258 | unsigned int width, unsigned int height, |
256 | bool exposures) { | 259 | bool exposures) { |
257 | // TODO: probably could call renderForeground here (with x,y,w,h) | 260 | // TODO: probably could call renderForeground here (with x,y,w,h) |
258 | XClearArea(display(), window(), x, y, width, height, exposures); | 261 | if (m_lastbg_pm == ParentRelative && m_renderer) |
262 | FbWindow::clear(); | ||
263 | else | ||
264 | XClearArea(display(), window(), x, y, width, height, exposures); | ||
259 | } | 265 | } |
260 | 266 | ||
261 | // If override_is_offset, then dest_override is a pixmap located at the_x, the_y | 267 | // If override_is_offset, then dest_override is a pixmap located at the_x, the_y |
diff --git a/src/main.cc b/src/main.cc index d7261e5..a8b7699 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -303,6 +303,8 @@ int main(int argc, char **argv) { | |||
303 | if (errbuf != 0) | 303 | if (errbuf != 0) |
304 | cerr.rdbuf(errbuf); | 304 | cerr.rdbuf(errbuf); |
305 | 305 | ||
306 | FbTk::FbStringUtil::shutdown(); | ||
307 | |||
306 | if (restarting) { | 308 | if (restarting) { |
307 | const char *arg = restart_argument.c_str(); | 309 | const char *arg = restart_argument.c_str(); |
308 | if (arg) { | 310 | if (arg) { |