all repos — fluxbox @ 15fe67e21e0529fbced36bea3d938611ea1a128a

custom fork of the fluxbox windowmanager

fix up slit transparency redraw issues
rathnor rathnor
commit

15fe67e21e0529fbced36bea3d938611ea1a128a

parent

c1fb3b3e1a08ef8ad479cf76ba2520bc72591c6c

3 files changed, 9 insertions(+), 41 deletions(-)

jump to
M ChangeLogChangeLog

@@ -9,6 +9,8 @@ to the Screen section in your XF86Config file. And let me know

how it goes :) It basically means we don't have to refresh menus as much, but uses more memory. Shouldn't break anything new. Menu.cc FbWindow.hh/cc + * Fix slit transparency too (finally) while we're at it (Simon) + Slit.hh/cc *04/05/13: * Fix a crash when a window closes while [opaque] moving (Simon) - also tidy up several related things when a window hides
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.93 2004/04/19 22:42:05 fluxgen Exp $ +// $Id: Slit.cc,v 1.94 2004/05/17 15:20:32 rathnor Exp $ #include "Slit.hh"

@@ -310,10 +310,8 @@ screen().rootWindow().depth(), InputOutput, screen().rootWindow().visual(),

create_mask, &attrib); FbTk::EventManager::instance()->add(*this, frame.window); - m_transp.reset(new FbTk::Transparent(screen().rootPixmap(), frame.window.drawable(), - *m_rc_alpha, - screen().screenNumber())); - + + frame.window.setAlpha(*m_rc_alpha); m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer)); moveToLayer((*m_rc_layernum).getNum());

@@ -689,15 +687,7 @@

if (tmp) image_ctrl.removeImage(tmp); - if (m_transp.get()) { - if (frame.pixmap == 0) - m_transp->setDest(frame.window.drawable(), frame.window.screenNumber()); - else - m_transp->setDest(frame.pixmap, frame.window.screenNumber()); - - m_transp->setAlpha(*m_rc_alpha); - } - + frame.window.setAlpha(*m_rc_alpha); clearWindow(); int x = 0, y = 0;

@@ -1041,18 +1031,7 @@ void Slit::exposeEvent(XExposeEvent &ev) {

// we don't need to clear the entire window // just the are that gets exposed frame.window.clearArea(ev.x, ev.y, ev.width, ev.height); - if (m_transp.get()) { - if ((int)m_transp->alpha() != *m_rc_alpha) - m_transp->setAlpha(*m_rc_alpha); - - if (screen().rootPixmap() != m_transp->source()) - m_transp->setSource(screen().rootPixmap(), screen().screenNumber()); - - m_transp->render(frame.window.x() + ev.x, frame.window.y() + ev.y, - ev.x, ev.y, - ev.width, ev.height); - - } + frame.window.updateTransparent(ev.x, ev.y, ev.width, ev.height); } void Slit::update(FbTk::Subject *subj) {

@@ -1061,19 +1040,7 @@ }

void Slit::clearWindow() { frame.window.clear(); - if (m_transp.get()) { - if ((int)m_transp->alpha() != *m_rc_alpha) - m_transp->setAlpha(*m_rc_alpha); - - if (screen().rootPixmap() != m_transp->source()) - m_transp->setSource(screen().rootPixmap(), screen().screenNumber()); - - m_transp->render(frame.window.x(), frame.window.y(), - 0, 0, - frame.window.width(), frame.window.height()); - - } - + frame.window.updateTransparent(); } void Slit::toggleHidden() {
M src/Slit.hhsrc/Slit.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -/// $Id: Slit.hh,v 1.39 2004/04/19 22:42:26 fluxgen Exp $ +/// $Id: Slit.hh,v 1.40 2004/05/17 15:20:32 rathnor Exp $ #ifndef SLIT_HH #define SLIT_HH

@@ -152,7 +152,6 @@ Atom m_kwm1_dockwindow, m_kwm2_dockwindow;

std::auto_ptr<FbTk::XLayerItem> m_layeritem; std::auto_ptr<SlitTheme> m_slit_theme; - std::auto_ptr<FbTk::Transparent> m_transp; static unsigned int s_eventmask; Strut *m_strut;