From e99c28724bcb7cc605b2c7c3081ecfdf63e87d8a Mon Sep 17 00:00:00 2001
From: simonb <simonb>
Date: Fri, 21 Apr 2006 16:20:56 +0000
Subject: minor fixes to slit transparency handling

---
 ChangeLog   |  2 ++
 src/Slit.cc | 20 ++++++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 54c7b60..46a8c86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 (Format: Year/Month/Day)
 Changes for 0.9.16:
 *06/04/21:
+   * Minor fixes to slit transparency (esp if autohidden) (Simon)
+     Slit.cc
    * php_coder tells me that the nb_NO patch was somewhat broken
      Revert it for now, pending another update ... (Simon)
      nls/nb_NO/Translation.m
diff --git a/src/Slit.cc b/src/Slit.cc
index d2fbcd5..e418a93 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -675,16 +675,10 @@ void Slit::reconfigure() {
     else
         frame.height += bevel_width*2;
 
-    reposition();
     Display *disp = FbTk::App::instance()->display();
 
     frame.window.setBorderWidth(theme().borderWidth());
     frame.window.setBorderColor(theme().borderColor());
-    // did we actually use slit slots
-    if (num_windows == 0)
-        frame.window.hide();
-    else
-        frame.window.show();
 
     Pixmap tmp = frame.pixmap;
     FbTk::ImageControl &image_ctrl = screen().imageControl();
@@ -709,7 +703,14 @@ void Slit::reconfigure() {
     } else {
         frame.window.setAlpha(*m_rc_alpha);
     }
-    clearWindow();
+    // reposition clears the bg
+    reposition();
+
+    // did we actually use slit slots
+    if (num_windows == 0)
+        frame.window.hide();
+    else
+        frame.window.show();
 
     int x = 0, y = 0;
     height_inc = false;
@@ -908,7 +909,9 @@ void Slit::reposition() {
         frame.window.moveResize(frame.x,  frame.y,
                                 frame.width, frame.height);
     }
-
+    updateBackground(true);
+    if (*m_rc_alpha != 255)
+        clearWindow();
 }
 
 
@@ -1343,6 +1346,7 @@ void Slit::updateAlpha() {
         frame.window.setOpaque(*m_rc_alpha);
     } else {
         frame.window.setAlpha(*m_rc_alpha);
+        updateBackground(true);
         clearWindow();
     }
 }
-- 
cgit v0.11.2