mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2026-05-13 22:28:32 +02:00
rollback changes accidentally kept from v0.54
This commit is contained in:
parent
b71e7d0fc6
commit
9753dedee3
1 changed files with 9 additions and 12 deletions
|
|
@ -7,18 +7,16 @@
|
|||
#include <any>
|
||||
#include <sstream>
|
||||
|
||||
#define protected public
|
||||
#define private public
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/desktop/view/Window.hpp>
|
||||
#include <hyprland/src/config/legacy/ConfigManager.hpp>
|
||||
#include <hyprland/src/config/ConfigManager.hpp>
|
||||
#include <hyprland/src/render/Renderer.hpp>
|
||||
#include <hyprland/src/managers/input/InputManager.hpp>
|
||||
#include <hyprland/src/helpers/time/Time.hpp>
|
||||
#include <hyprland/src/layout/LayoutManager.hpp>
|
||||
#include <hyprland/src/event/EventBus.hpp>
|
||||
#undef private
|
||||
#undef protected
|
||||
|
||||
#include <hyprland/src/layout/space/Space.hpp>
|
||||
#include "globals.hpp"
|
||||
|
|
@ -127,13 +125,13 @@ void onRenderStage(eRenderStage stage) {
|
|||
for (auto& bg : bgWindows) {
|
||||
const auto bgw = bg.lock();
|
||||
|
||||
if (bgw->m_monitor != g_pHyprRenderer->renderData().pMonitor)
|
||||
if (bgw->m_monitor != g_pHyprOpenGL->m_renderData.pMonitor)
|
||||
continue;
|
||||
|
||||
// cant use setHidden cuz that sends suspended and shit too that would be laggy
|
||||
bgw->m_hidden = false;
|
||||
|
||||
g_pHyprRenderer->renderWindow(bgw, g_pHyprRenderer->renderData().pMonitor.lock(), Time::steadyNow(), false, Render::RENDER_PASS_ALL, false, true);
|
||||
g_pHyprRenderer->renderWindow(bgw, g_pHyprOpenGL->m_renderData.pMonitor.lock(), Time::steadyNow(), false, RENDER_PASS_ALL, false, true);
|
||||
|
||||
bgw->m_hidden = true;
|
||||
}
|
||||
|
|
@ -152,7 +150,7 @@ void onCommitSubsurface(Desktop::View::CSubsurface* thisptr) {
|
|||
|
||||
((origCommitSubsurface)subsurfaceHook->m_original)(thisptr);
|
||||
if (const auto MON = PWINDOW->m_monitor.lock(); MON)
|
||||
MON->m_blurFBDirty = true;
|
||||
g_pHyprOpenGL->markBlurDirtyForMonitor(MON);
|
||||
|
||||
PWINDOW->m_hidden = true;
|
||||
}
|
||||
|
|
@ -170,25 +168,24 @@ void onCommit(void* owner, void* data) {
|
|||
|
||||
((origCommit)commitHook->m_original)(owner, data);
|
||||
if (const auto MON = PWINDOW->m_monitor.lock(); MON)
|
||||
MON->m_blurFBDirty = true;
|
||||
g_pHyprOpenGL->markBlurDirtyForMonitor(MON);
|
||||
|
||||
PWINDOW->m_hidden = true;
|
||||
}
|
||||
|
||||
void onConfigReloaded() {
|
||||
WP<Config::Legacy::CConfigManager> mgr = dynamicPointerCast<Config::Legacy::CConfigManager>(WP<Config::IConfigManager>(Config::mgr()));
|
||||
static auto* const PCLASS = (Hyprlang::STRING const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprwinwrap:class")->getDataStaticPtr();
|
||||
const std::string classRule(*PCLASS);
|
||||
if (!classRule.empty()) {
|
||||
mgr->parseKeyword("windowrulev2", std::string{"float, class:^("} + classRule + ")$");
|
||||
mgr->parseKeyword("windowrulev2", std::string{"size 100\% 100\%, class:^("} + classRule + ")$");
|
||||
g_pConfigManager->parseKeyword("windowrulev2", std::string{"float, class:^("} + classRule + ")$");
|
||||
g_pConfigManager->parseKeyword("windowrulev2", std::string{"size 100\% 100\%, class:^("} + classRule + ")$");
|
||||
}
|
||||
|
||||
static auto* const PTITLE = (Hyprlang::STRING const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprwinwrap:title")->getDataStaticPtr();
|
||||
const std::string titleRule(*PTITLE);
|
||||
if (!titleRule.empty()) {
|
||||
mgr->parseKeyword("windowrulev2", std::string{"float, title:^("} + titleRule + ")$");
|
||||
mgr->parseKeyword("windowrulev2", std::string{"size 100\% 100\%, title:^("} + titleRule + ")$");
|
||||
g_pConfigManager->parseKeyword("windowrulev2", std::string{"float, title:^("} + titleRule + ")$");
|
||||
g_pConfigManager->parseKeyword("windowrulev2", std::string{"size 100\% 100\%, title:^("} + titleRule + ")$");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue