mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2026-01-06 07:10:08 +01:00
all: chase hl time changes
This commit is contained in:
parent
b08909ec7b
commit
faa4e78275
2 changed files with 8 additions and 14 deletions
|
|
@ -4,8 +4,10 @@
|
|||
#include <hyprland/src/render/Renderer.hpp>
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/config/ConfigValue.hpp>
|
||||
#include <hyprland/src/config/ConfigManager.hpp>
|
||||
#include <hyprland/src/managers/AnimationManager.hpp>
|
||||
#include <hyprland/src/managers/input/InputManager.hpp>
|
||||
#include <hyprland/src/helpers/time/Time.hpp>
|
||||
#undef private
|
||||
#include "OverviewPassElement.hpp"
|
||||
|
||||
|
|
@ -94,9 +96,6 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
|||
|
||||
g_pHyprRenderer->makeEGLCurrent();
|
||||
|
||||
timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
|
||||
Vector2D tileSize = pMonitor->vecSize / SIDE_LENGTH;
|
||||
Vector2D tileRenderSize = (pMonitor->vecSize - Vector2D{GAP_WIDTH * pMonitor->scale, GAP_WIDTH * pMonitor->scale} * (SIDE_LENGTH - 1)) / SIDE_LENGTH;
|
||||
CBox monbox{0, 0, tileSize.x * 2, tileSize.y * 2};
|
||||
|
|
@ -137,7 +136,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
|||
if (PWORKSPACE == startedOn)
|
||||
PMONITOR->activeSpecialWorkspace = openSpecial;
|
||||
|
||||
g_pHyprRenderer->renderWorkspace(PMONITOR, PWORKSPACE, &now, monbox);
|
||||
g_pHyprRenderer->renderWorkspace(PMONITOR, PWORKSPACE, Time::steadyNow(), monbox);
|
||||
|
||||
PWORKSPACE->m_bVisible = false;
|
||||
PWORKSPACE->startAnim(false, false, true);
|
||||
|
|
@ -145,7 +144,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
|||
if (PWORKSPACE == startedOn)
|
||||
PMONITOR->activeSpecialWorkspace.reset();
|
||||
} else
|
||||
g_pHyprRenderer->renderWorkspace(PMONITOR, PWORKSPACE, &now, monbox);
|
||||
g_pHyprRenderer->renderWorkspace(PMONITOR, PWORKSPACE, Time::steadyNow(), monbox);
|
||||
|
||||
image.box = {(i % SIDE_LENGTH) * tileRenderSize.x + (i % SIDE_LENGTH) * GAP_WIDTH, (i / SIDE_LENGTH) * tileRenderSize.y + (i / SIDE_LENGTH) * GAP_WIDTH, tileRenderSize.x,
|
||||
tileRenderSize.y};
|
||||
|
|
@ -237,9 +236,6 @@ void COverview::redrawID(int id, bool forcelowres) {
|
|||
if (!ENABLE_LOWRES)
|
||||
monbox = {{0, 0}, pMonitor->vecPixelSize};
|
||||
|
||||
timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
|
||||
auto& image = images[id];
|
||||
|
||||
if (image.fb.m_vSize != monbox.size()) {
|
||||
|
|
@ -268,7 +264,7 @@ void COverview::redrawID(int id, bool forcelowres) {
|
|||
if (PWORKSPACE == startedOn)
|
||||
pMonitor->activeSpecialWorkspace = openSpecial;
|
||||
|
||||
g_pHyprRenderer->renderWorkspace(pMonitor.lock(), PWORKSPACE, &now, monbox);
|
||||
g_pHyprRenderer->renderWorkspace(pMonitor.lock(), PWORKSPACE, Time::steadyNow(), monbox);
|
||||
|
||||
PWORKSPACE->m_bVisible = false;
|
||||
PWORKSPACE->startAnim(false, false, true);
|
||||
|
|
@ -276,7 +272,7 @@ void COverview::redrawID(int id, bool forcelowres) {
|
|||
if (PWORKSPACE == startedOn)
|
||||
pMonitor->activeSpecialWorkspace.reset();
|
||||
} else
|
||||
g_pHyprRenderer->renderWorkspace(pMonitor.lock(), PWORKSPACE, &now, monbox);
|
||||
g_pHyprRenderer->renderWorkspace(pMonitor.lock(), PWORKSPACE, Time::steadyNow(), monbox);
|
||||
|
||||
g_pHyprOpenGL->m_RenderData.blockScreenShader = true;
|
||||
g_pHyprRenderer->endRender();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <hyprland/src/render/Renderer.hpp>
|
||||
#include <hyprland/src/managers/LayoutManager.hpp>
|
||||
#include <hyprland/src/managers/input/InputManager.hpp>
|
||||
#include <hyprland/src/helpers/time/Time.hpp>
|
||||
#undef private
|
||||
|
||||
#include "globals.hpp"
|
||||
|
|
@ -78,13 +79,10 @@ void onRenderStage(eRenderStage stage) {
|
|||
if (bgw->m_pMonitor != g_pHyprOpenGL->m_RenderData.pMonitor)
|
||||
continue;
|
||||
|
||||
timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
|
||||
// cant use setHidden cuz that sends suspended and shit too that would be laggy
|
||||
bgw->m_bHidden = false;
|
||||
|
||||
g_pHyprRenderer->renderWindow(bgw, g_pHyprOpenGL->m_RenderData.pMonitor.lock(), &now, false, 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_bHidden = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue