diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-02 11:56:01 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-02 11:56:01 +0100 |
commit | bfadff61d2554b153d973b3cf150420ca60a4143 (patch) | |
tree | 24b948532a1987c8a7b2894f97a4184a6a712e81 /include/Overlay.hpp | |
parent | 6fbd8b0dd369c704b21c8757c1f66e55dcf1cb91 (diff) |
Force window always on top, even if restacking order changes
Diffstat (limited to 'include/Overlay.hpp')
-rw-r--r-- | include/Overlay.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/Overlay.hpp b/include/Overlay.hpp index a138d07..eafb4ab 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -7,11 +7,12 @@ #include "window_texture.h" #include <mglpp/window/Window.hpp> +#include <mglpp/window/Event.hpp> #include <mglpp/graphics/Texture.hpp> #include <mglpp/graphics/Sprite.hpp> #include <mglpp/graphics/Rectangle.hpp> #include <mglpp/graphics/Text.hpp> -#include <mglpp/window/Event.hpp> +#include <mglpp/system/Clock.hpp> namespace gsr { class DropdownButton; @@ -32,7 +33,7 @@ namespace gsr { class Overlay { public: - Overlay(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); Overlay(const Overlay&) = delete; Overlay& operator=(const Overlay&) = delete; ~Overlay(); @@ -75,6 +76,8 @@ namespace gsr { void on_press_start_record(); void on_press_start_stream(); bool update_compositor_texture(const mgl_monitor *monitor); + + void force_window_on_top(); private: using KeyBindingCallback = std::function<void()>; struct KeyBinding { @@ -87,7 +90,6 @@ namespace gsr { std::string resources_path; GsrInfo gsr_info; egl_functions egl_funcs; - mgl::Color bg_color; std::vector<gsr::AudioDevice> audio_devices; mgl::Texture window_texture_texture; mgl::Sprite window_texture_sprite; @@ -109,6 +111,7 @@ namespace gsr { DropdownButton *replay_dropdown_button_ptr = nullptr; DropdownButton *record_dropdown_button_ptr = nullptr; DropdownButton *stream_dropdown_button_ptr = nullptr; + mgl::Clock force_window_on_top_clock; RecordingStatus recording_status = RecordingStatus::NONE; bool paused = false; |