1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Linux: Recreate mouse cursors when showing them on a different display to the one that they were originally created on

This commit is contained in:
ed 2019-05-07 17:10:52 +01:00
parent e7136b57f2
commit 46a97e1f2c
2 changed files with 35 additions and 4 deletions

View file

@ -53,7 +53,8 @@ public:
}
SharedCursorHandle (const Image& image, Point<int> hotSpot, float scaleFactor)
: handle (CustomMouseCursorInfo (image, hotSpot, scaleFactor).create()),
: info (new CustomMouseCursorInfo (image, hotSpot, scaleFactor)),
handle (info->create()),
standardType (MouseCursor::NormalCursor),
isStandard (false)
{
@ -106,10 +107,15 @@ public:
}
}
void* getHandle() const noexcept { return handle; }
void* getHandle() const noexcept { return handle; }
void setHandle (void* newHandle) { handle = newHandle; }
MouseCursor::StandardCursorType getType() const noexcept { return standardType; }
CustomMouseCursorInfo* getCustomInfo() const noexcept { return info.get(); }
private:
void* const handle;
std::unique_ptr<CustomMouseCursorInfo> info;
void* handle;
Atomic<int> refCount { 1 };
const MouseCursor::StandardCursorType standardType;
const bool isStandard;