From b382c7e3c6645c977cd9a7bf28b639a349d5bbde Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 18 Apr 2017 14:58:49 +0200 Subject: Make visible() call into nativewindow and make Win32 windows invisible on creation. --- plugingui/nativewindow_x11.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugingui/nativewindow_x11.cc') 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) -- cgit v1.2.3