From a9637f87e7c850717443f10af15bed62655fc445 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 17 Jan 2025 13:18:40 +0100 Subject: Fix background not being transparent on sway when a wayland application is focused and opening the ui --- include/Overlay.hpp | 3 ++- include/WindowUtils.hpp | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Overlay.hpp b/include/Overlay.hpp index e802cd0..45776b8 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -5,6 +5,7 @@ #include "GsrInfo.hpp" #include "Config.hpp" #include "window_texture.h" +#include "WindowUtils.hpp" #include #include @@ -97,7 +98,7 @@ namespace gsr { void on_press_start_replay(bool disable_notification); void on_press_start_record(); void on_press_start_stream(); - bool update_compositor_texture(const mgl_monitor *monitor); + bool update_compositor_texture(const Monitor &monitor); void force_window_on_top(); private: diff --git a/include/WindowUtils.hpp b/include/WindowUtils.hpp index d17c0fd..c8806df 100644 --- a/include/WindowUtils.hpp +++ b/include/WindowUtils.hpp @@ -2,6 +2,7 @@ #include #include +#include #include namespace gsr { @@ -10,10 +11,16 @@ namespace gsr { CURSOR }; + struct Monitor { + mgl::vec2i position; + mgl::vec2i size; + }; + Window get_focused_window(Display *dpy, WindowCaptureType cap_type); std::string get_focused_window_name(Display *dpy, WindowCaptureType window_capture_type); mgl::vec2i get_cursor_position(Display *dpy, Window *window); mgl::vec2i create_window_get_center_position(Display *display); std::string get_window_manager_name(Display *display); bool is_compositor_running(Display *dpy, int screen); + std::vector get_monitors(Display *dpy); } \ No newline at end of file -- cgit v1.2.3