summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_x11.cc
diff options
context:
space:
mode:
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)