From bb5cd5b2ddcb2dbe58613aa41fa2062208208339 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 17 May 2025 18:03:35 +0100 Subject: 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 --- src/protocols/Screencopy.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/protocols/Screencopy.hpp') 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 @@ -72,10 +73,15 @@ class CScreencopyFrame { int m_shmStride = 0; CBox m_box = {}; - void copy(CZwlrScreencopyFrameV1* pFrame, wl_resource* buffer); - void copyDmabuf(std::function 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 callback); + bool copyShm(); + void renderMon(); + void storeTempFB(); + void share(); friend class CScreencopyProtocol; }; -- cgit v1.2.3