absolute mouse coordinates regardless of the number of monitors attached on Linux

This commit is contained in:
loki
2021-05-11 23:51:45 +02:00
parent 1d84c8f9ce
commit 2e9a1cfbba
5 changed files with 27 additions and 24 deletions

View File

@@ -122,6 +122,7 @@ enum class capture_e : int {
class display_t {
public:
display_t() noexcept : offset_x { 0 }, offset_y { 0 } {}
virtual capture_e snapshot(img_t *img, std::chrono::milliseconds timeout, bool cursor) = 0;
virtual std::shared_ptr<img_t> alloc_img() = 0;
@@ -133,6 +134,9 @@ public:
virtual ~display_t() = default;
// Offsets for when streaming a specific monitor. By default, they are 0.
int offset_x, offset_y;
int width, height;
};