summaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/App.cc3
-rw-r--r--src/FbTk/FbString.cc8
-rw-r--r--src/FbTk/FbWindow.cc8
3 files changed, 12 insertions, 7 deletions
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
58void init() { 58void 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
94void shutdown() { 92void 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
250void FbWindow::clear() { 250void 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
254void FbWindow::clearArea(int x, int y, 257void 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