Просмотр исходного кода

Changed window clear method

Actually clear the window instead of drawing a 0x0 rectangle which for some reason pisses off compton.
Sam Lakerveld 9 лет назад
Родитель
Сommit
cc21c2d491
1 измененных файлов: 2 добавлений и 6 удалений
  1. 2
    6
      rectangle.cpp

+ 2
- 6
rectangle.cpp Просмотреть файл

@@ -9,12 +9,8 @@ slop::Rectangle::~Rectangle() {
9 9
         return;
10 10
     }
11 11
     // Try to erase the window before destroying it.
12
-    XRectangle rect;
13
-    rect.x = 0;
14
-    rect.y = 0;
15
-    rect.width = 0;
16
-    rect.height = 0;
17
-    XShapeCombineRectangles( xengine->m_display, m_window, ShapeBounding, 0, 0, &rect, 1, ShapeSet, 0);
12
+    XSetWindowBackground( xengine->m_display, m_window, 0 );
13
+    XClearWindow( xengine->m_display, m_window );
18 14
     // Sleep for 0.1 seconds in hope that the rectangle was erased.
19 15
     usleep( 10000 );
20 16
     // Free up our color.