diff options
| author | Naufal Hisyam Muzakki <155966008+NaufalH27@users.noreply.github.com> | 2026-01-21 22:55:12 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-21 15:55:12 +0000 |
| commit | e7985ca4c4fa6ca0d96a2f303c3f0395d2d27b31 (patch) | |
| tree | 9c1c5733e28980567a3280a09dbfd9212bfa0e12 /hyprtester/plugin/src/main.cpp | |
| parent | 6c3ebed76e7def7b853e21fbf93f6eeb176696f9 (diff) | |
desktop: restore invisible floating window alpha/opacity when focused over fullscreen (#12994)
Diffstat (limited to 'hyprtester/plugin/src/main.cpp')
| -rw-r--r-- | hyprtester/plugin/src/main.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hyprtester/plugin/src/main.cpp b/hyprtester/plugin/src/main.cpp index d8f3c971..f8f858b4 100644 --- a/hyprtester/plugin/src/main.cpp +++ b/hyprtester/plugin/src/main.cpp @@ -296,6 +296,24 @@ static SDispatchResult checkRule(std::string in) { return {}; } +static SDispatchResult floatingFocusOnFullscreen(std::string in) { + const auto PLASTWINDOW = Desktop::focusState()->window(); + + if (!PLASTWINDOW) + return {.success = false, .error = "No window"}; + + if (!PLASTWINDOW->m_isFloating) + return {.success = false, .error = "Window must be floating"}; + + if (PLASTWINDOW->m_alpha != 1.f) + return {.success = false, .error = "floating window doesnt restore it opacity when focused on fullscreen workspace"}; + + if (!PLASTWINDOW->m_createdOverFullscreen) + return {.success = false, .error = "floating window doesnt get flagged as createdOverFullscreen"}; + + return {}; +} + APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { PHANDLE = handle; @@ -309,6 +327,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { HyprlandAPI::addDispatcherV2(PHANDLE, "plugin:test:keybind", ::keybind); HyprlandAPI::addDispatcherV2(PHANDLE, "plugin:test:add_rule", ::addRule); HyprlandAPI::addDispatcherV2(PHANDLE, "plugin:test:check_rule", ::checkRule); + HyprlandAPI::addDispatcherV2(PHANDLE, "plugin:test:floating_focus_on_fullscreen", ::floatingFocusOnFullscreen); // init mouse g_mouse = CTestMouse::create(false); |
