Selaa lähdekoodia

Merge pull request #11 from Darkwater124/patch-1

Changed window clear method
Dalton Nell 9 vuotta sitten
vanhempi
commit
342573b7c6
1 muutettua tiedostoa jossa 2 lisäystä ja 6 poistoa
  1. 2
    6
      rectangle.cpp

+ 2
- 6
rectangle.cpp Näytä tiedosto

@@ -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.