fix parentrelative background, and some tidying
This commit is contained in:
parent
d508292a57
commit
4afe5499b2
5 changed files with 18 additions and 8 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
(Format: Year/Month/Day)
|
||||
Changes for 0.9.16:
|
||||
*06/05/22:
|
||||
* Fix handling of ParentRelative background (Simon)
|
||||
FbWindow.cc
|
||||
*06/05/21:
|
||||
* Fix build on cygwin (iconv const error) (Simon)
|
||||
FbTk/FbString.cc
|
||||
|
|
|
@ -59,8 +59,7 @@ App::~App() {
|
|||
|
||||
Font::shutdown();
|
||||
Image::shutdown();
|
||||
FbStringUtil::shutdown();
|
||||
|
||||
|
||||
XCloseDisplay(m_display);
|
||||
m_display = 0;
|
||||
}
|
||||
|
|
|
@ -56,10 +56,8 @@ static int iconv_convs[CONVSIZE];
|
|||
|
||||
/// Initialise all of the iconv conversion descriptors
|
||||
void init() {
|
||||
static bool s_init = false;
|
||||
if (s_init)
|
||||
if (iconv_convs != 0)
|
||||
return;
|
||||
s_init = true;
|
||||
|
||||
iconv_convs = new iconv_t[CONVSIZE];
|
||||
|
||||
|
@ -92,6 +90,8 @@ void init() {
|
|||
}
|
||||
|
||||
void shutdown() {
|
||||
if (iconv_convs == 0)
|
||||
return;
|
||||
#ifdef HAVE_ICONV
|
||||
for (int i=0; i < CONVSIZE; ++i)
|
||||
if (iconv_convs[i] != (iconv_t)(-1))
|
||||
|
@ -99,7 +99,7 @@ void shutdown() {
|
|||
#endif // HAVE_ICONV
|
||||
|
||||
delete[] iconv_convs;
|
||||
|
||||
iconv_convs = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -249,13 +249,19 @@ void FbWindow::setEventMask(long mask) {
|
|||
|
||||
void FbWindow::clear() {
|
||||
XClearWindow(display(), m_window);
|
||||
if (m_lastbg_pm == ParentRelative && m_renderer)
|
||||
m_renderer->renderForeground(*this, *this);
|
||||
|
||||
}
|
||||
|
||||
void FbWindow::clearArea(int x, int y,
|
||||
unsigned int width, unsigned int height,
|
||||
bool exposures) {
|
||||
// TODO: probably could call renderForeground here (with x,y,w,h)
|
||||
XClearArea(display(), window(), x, y, width, height, exposures);
|
||||
if (m_lastbg_pm == ParentRelative && m_renderer)
|
||||
FbWindow::clear();
|
||||
else
|
||||
XClearArea(display(), window(), x, y, width, height, exposures);
|
||||
}
|
||||
|
||||
// If override_is_offset, then dest_override is a pixmap located at the_x, the_y
|
||||
|
|
|
@ -303,6 +303,8 @@ int main(int argc, char **argv) {
|
|||
if (errbuf != 0)
|
||||
cerr.rdbuf(errbuf);
|
||||
|
||||
FbTk::FbStringUtil::shutdown();
|
||||
|
||||
if (restarting) {
|
||||
const char *arg = restart_argument.c_str();
|
||||
if (arg) {
|
||||
|
|
Loading…
Reference in a new issue