summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-02-03 19:58:12 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-02-03 19:58:12 +0100
commit44f405b5460f6163e8772095de9a64082b76f075 (patch)
tree388376dc2466bc66654588fbf5c15eefb7afa6c3 /plugingui
parent091997de9a9faab2619647e8927370372604fe30 (diff)
Remove background flickering on window resize.
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/nativewindow_x11.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/plugingui/nativewindow_x11.cc b/plugingui/nativewindow_x11.cc
index 353a371..5bb6474 100644
--- a/plugingui/nativewindow_x11.cc
+++ b/plugingui/nativewindow_x11.cc
@@ -49,8 +49,6 @@ NativeWindowX11::NativeWindowX11(void* native_window, Window& window)
screen = DefaultScreen(display);
- int clearColor = 0xbbbbbb;
-
::Window parentWindow;
if(native_window)
{
@@ -63,12 +61,18 @@ NativeWindowX11::NativeWindowX11(void* native_window, Window& window)
// Create the window
unsigned long border = 0;
- xwindow = XCreateSimpleWindow(display,
- parentWindow,
- window.x(), window.y(),
- window.width(), window.height(),
- border,
- clearColor, clearColor);
+ XSetWindowAttributes swa;
+ swa.backing_store = Always;
+ xwindow = XCreateWindow(display,
+ parentWindow,
+ window.x(), window.y(),
+ window.width(), window.height(),
+ border,
+ CopyFromParent, // depth
+ CopyFromParent, // class
+ CopyFromParent, // visual
+ CWBackingStore,
+ &swa);
long mask = (StructureNotifyMask |
PointerMotionMask |