Skip to content

Commit

Permalink
Changed window clear method
Browse files Browse the repository at this point in the history
Actually clear the window instead of drawing a 0x0 rectangle which for some reason pisses off compton.
  • Loading branch information
darkwater committed Oct 4, 2014
1 parent e66dba9 commit cc21c2d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cc21c2d

Please sign in to comment.