From 80ff6582a95854712221bf4c84252584566ac041 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 27 Oct 2024 13:56:03 +0100 Subject: Fix window not visible in fullscreen applications --- include/Overlay.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/Overlay.hpp') diff --git a/include/Overlay.hpp b/include/Overlay.hpp index d5a8fb6..c580a12 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -32,13 +32,14 @@ namespace gsr { class Overlay { public: - Overlay(mgl::Window &window, std::string resources_path, GsrInfo gsr_info, egl_functions egl_funcs, mgl::Color bg_color); + Overlay(std::string resources_path, GsrInfo gsr_info, egl_functions egl_funcs, mgl::Color bg_color); Overlay(const Overlay&) = delete; Overlay& operator=(const Overlay&) = delete; ~Overlay(); - void on_event(mgl::Event &event, mgl::Window &window); - void draw(mgl::Window &window); + void handle_events(); + void on_event(mgl::Event &event); + void draw(); void show(); void hide(); @@ -80,7 +81,8 @@ namespace gsr { KeyBindingCallback callback; }; - mgl::Window &window; + std::unique_ptr window; + mgl::Event event; std::string resources_path; GsrInfo gsr_info; egl_functions egl_funcs; -- cgit v1.2.3