screencopy: improve consistency of share indicator
This commit is contained in:
parent
b4f75525d9
commit
ae82c3a639
4 changed files with 27 additions and 16 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <list>
|
||||
#include <vector>
|
||||
#include "../managers/HookSystemManager.hpp"
|
||||
#include "../helpers/Timer.hpp"
|
||||
|
||||
class CMonitor;
|
||||
|
||||
|
|
@ -20,20 +21,21 @@ class CScreencopyClient {
|
|||
CScreencopyClient();
|
||||
~CScreencopyClient();
|
||||
|
||||
int ref = 0;
|
||||
wl_resource* resource = nullptr;
|
||||
int ref = 0;
|
||||
wl_resource* resource = nullptr;
|
||||
|
||||
eClientOwners clientOwner = CLIENT_SCREENCOPY;
|
||||
eClientOwners clientOwner = CLIENT_SCREENCOPY;
|
||||
|
||||
int frameCounter = 0;
|
||||
int framesInLastHalfSecond = 0;
|
||||
std::chrono::system_clock::time_point lastMeasure;
|
||||
bool sentScreencast = false;
|
||||
int frameCounter = 0;
|
||||
int framesInLastHalfSecond = 0;
|
||||
CTimer lastMeasure;
|
||||
CTimer lastFrame;
|
||||
bool sentScreencast = false;
|
||||
|
||||
void onTick();
|
||||
HOOK_CALLBACK_FN* tickCallback = nullptr;
|
||||
void onTick();
|
||||
HOOK_CALLBACK_FN* tickCallback = nullptr;
|
||||
|
||||
bool operator==(const CScreencopyClient& other) const {
|
||||
bool operator==(const CScreencopyClient& other) const {
|
||||
return resource == other.resource;
|
||||
}
|
||||
};
|
||||
|
|
@ -94,4 +96,6 @@ class CScreencopyProtocolManager {
|
|||
void sendFrameDamage(SScreencopyFrame* frame);
|
||||
bool copyFrameDmabuf(SScreencopyFrame* frame);
|
||||
bool copyFrameShm(SScreencopyFrame* frame, timespec* now);
|
||||
|
||||
friend class CScreencopyClient;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue