summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugingui/eventhandler.cc3
-rw-r--r--plugingui/window.cc7
-rw-r--r--plugingui/window.h1
3 files changed, 4 insertions, 7 deletions
diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc
index decca01..4200d49 100644
--- a/plugingui/eventhandler.cc
+++ b/plugingui/eventhandler.cc
@@ -67,7 +67,8 @@ void EventHandler::processEvents()
bool block_interaction{false};
for(auto dialog : dialogs)
{
- if(dialog->visible())
+ // Check if the dialog nativewindow (not the contained widget) is visible
+ if(dialog->native->visible())
{
block_interaction |= dialog->isModal();
dialog->eventHandler()->processEvents();
diff --git a/plugingui/window.cc b/plugingui/window.cc
index 3840643..099cb91 100644
--- a/plugingui/window.cc
+++ b/plugingui/window.cc
@@ -71,6 +71,8 @@ Window::Window(void* native_window)
#endif // !UI_PUGL
eventhandler = new EventHandler(*native, *this);
+
+ setVisible(true); // The root widget is always visible.
}
Window::~Window()
@@ -118,11 +120,6 @@ void Window::hide()
Widget::hide();
}
-bool Window::visible() const
-{
- return native->visible();
-}
-
Window* Window::window()
{
return this;
diff --git a/plugingui/window.h b/plugingui/window.h
index e248b69..218beec 100644
--- a/plugingui/window.h
+++ b/plugingui/window.h
@@ -52,7 +52,6 @@ public:
void move(int x, int y) override;
void show() override;
void hide() override;
- bool visible() const override;
Window* window() override;
ImageCache& getImageCache() override;