summaryrefslogtreecommitdiff
path: root/src/protocols/Screencopy.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-05-17 18:03:35 +0100
committerGitHub <noreply@github.com>2025-05-17 19:03:35 +0200
commitbb5cd5b2ddcb2dbe58613aa41fa2062208208339 (patch)
tree8e2ce632127952bb2abe81d0d9e4b3c668094352 /src/protocols/Screencopy.hpp
parentbb9aa79b216b952c692c2443c50b0a6d7e5b108d (diff)
screencopy: store a fb before permission popup if the permission is pending (#10455)
stops rendering the permission popup on stuff like grim when it asks
Diffstat (limited to 'src/protocols/Screencopy.hpp')
-rw-r--r--src/protocols/Screencopy.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/protocols/Screencopy.hpp b/src/protocols/Screencopy.hpp
index ead8b2ed..665fede1 100644
--- a/src/protocols/Screencopy.hpp
+++ b/src/protocols/Screencopy.hpp
@@ -10,6 +10,7 @@
#include "../managers/HookSystemManager.hpp"
#include "../helpers/time/Timer.hpp"
#include "../helpers/time/Time.hpp"
+#include "../render/Framebuffer.hpp"
#include "../managers/eventLoop/EventLoopTimer.hpp"
#include <aquamarine/buffer/Buffer.hpp>
@@ -72,10 +73,15 @@ class CScreencopyFrame {
int m_shmStride = 0;
CBox m_box = {};
- void copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer);
- void copyDmabuf(std::function<void(bool)> callback);
- bool copyShm();
- void share();
+ // if we have a pending perm, hold the buffer.
+ CFramebuffer m_tempFb;
+
+ void copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer);
+ void copyDmabuf(std::function<void(bool)> callback);
+ bool copyShm();
+ void renderMon();
+ void storeTempFB();
+ void share();
friend class CScreencopyProtocol;
};