aboutsummaryrefslogtreecommitdiff
path: root/include/Overlay.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-10-27 13:56:03 +0100
committerdec05eba <dec05eba@protonmail.com>2024-10-27 13:59:17 +0100
commit80ff6582a95854712221bf4c84252584566ac041 (patch)
tree50a4c72cf29b7c30b4bbc7c6b8c73523cd8e4a00 /include/Overlay.hpp
parent59dfd87c21026ef4dc713c3e0648cfa89d534557 (diff)
Fix window not visible in fullscreen applications
Diffstat (limited to 'include/Overlay.hpp')
-rw-r--r--include/Overlay.hpp10
1 files changed, 6 insertions, 4 deletions
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<mgl::Window> window;
+ mgl::Event event;
std::string resources_path;
GsrInfo gsr_info;
egl_functions egl_funcs;