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
This commit is contained in:
Vaxry 2025-05-17 18:03:35 +01:00 committed by GitHub
parent bb9aa79b21
commit bb5cd5b2dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 29 deletions

View file

@ -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;
};