summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_x11.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-18 14:58:49 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-18 14:59:08 +0200
commitb382c7e3c6645c977cd9a7bf28b639a349d5bbde (patch)
tree18813fb8f00f4814749957bd37af31de3b2c1cc3 /plugingui/nativewindow_x11.cc
parent37cb6cefcab6be0a1337e0a346d6e259f8dbbb5f (diff)
Make visible() call into nativewindow and make Win32 windows invisible on creation.
Diffstat (limited to 'plugingui/nativewindow_x11.cc')
-rw-r--r--plugingui/nativewindow_x11.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugingui/nativewindow_x11.cc b/plugingui/nativewindow_x11.cc
index af2f4a6..ae8ad2c 100644
--- a/plugingui/nativewindow_x11.cc
+++ b/plugingui/nativewindow_x11.cc
@@ -225,6 +225,18 @@ void NativeWindowX11::hide()
XUnmapWindow(display, xwindow);
}
+bool NativeWindowX11::visible() const
+{
+ if(display == nullptr)
+ {
+ return false;
+ }
+
+ XWindowAttributes xwa;
+ XGetWindowAttributes(display, xwindow, &xwa);
+ return (xwa.map_state == IsViewable);
+}
+
void NativeWindowX11::redraw(const Rect& dirty_rect)
{
if(display == nullptr)