opengl: use a stack for storing monitor transform enabled

fixes #10487
This commit is contained in:
Vaxry 2025-06-15 12:11:28 +02:00
parent 57d20a1bf6
commit 3db3baa19e
No known key found for this signature in database
GPG key ID: 665806380871D640
7 changed files with 48 additions and 30 deletions

View file

@ -11,6 +11,7 @@
#include <list>
#include <string>
#include <unordered_map>
#include <stack>
#include <map>
#include <cairo/cairo.h>
@ -195,7 +196,9 @@ class CHyprOpenGLImpl {
int outerRound = -1 /* use round */);
void renderTextureMatte(SP<CTexture> tex, const CBox& pBox, CFramebuffer& matte);
void setMonitorTransformEnabled(bool enabled);
void pushMonitorTransformEnabled(bool enabled);
void popMonitorTransformEnabled();
void setRenderModifEnabled(bool enabled);
void saveMatrix();
@ -310,12 +313,14 @@ class CHyprOpenGLImpl {
std::string m_extensions;
bool m_fakeFrame = false;
bool m_endFrame = false;
bool m_applyFinalShader = false;
bool m_blend = false;
bool m_offloadedFramebuffer = false;
bool m_cmSupported = true;
bool m_monitorTransformEnabled = false; // do not modify directly
std::stack<bool> m_monitorTransformStack;
SShader m_finalScreenShader;
CTimer m_globalTimer;
GLuint m_currentProgram;