From cc21c2d49168c1702a752f80c7edde07a2fd62ee Mon Sep 17 00:00:00 2001 From: Sam Lakerveld Date: Sun, 5 Oct 2014 01:28:10 +0200 Subject: [PATCH] Changed window clear method Actually clear the window instead of drawing a 0x0 rectangle which for some reason pisses off compton. --- rectangle.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rectangle.cpp b/rectangle.cpp index 57ef06d..d55f963 100644 --- a/rectangle.cpp +++ b/rectangle.cpp @@ -9,12 +9,8 @@ slop::Rectangle::~Rectangle() { return; } // Try to erase the window before destroying it. - XRectangle rect; - rect.x = 0; - rect.y = 0; - rect.width = 0; - rect.height = 0; - XShapeCombineRectangles( xengine->m_display, m_window, ShapeBounding, 0, 0, &rect, 1, ShapeSet, 0); + XSetWindowBackground( xengine->m_display, m_window, 0 ); + XClearWindow( xengine->m_display, m_window ); // Sleep for 0.1 seconds in hope that the rectangle was erased. usleep( 10000 ); // Free up our color.