mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-30 22:59:41 +02:00
Fix for #2875: MacOS cursor should now hide when not on the active screen. This time committed to the correct branch.
Thanks (again!) to Doug Marcey (dougmarcey@gmail.com) for the patch.
This commit is contained in:
parent
cd7249d41d
commit
ed1a77252b
2 changed files with 109 additions and 41 deletions
|
@ -34,6 +34,13 @@
|
|||
#include <IOKit/pwr_mgt/IOPMLib.h>
|
||||
#include <IOKit/IOMessage.h>
|
||||
|
||||
extern "C" {
|
||||
typedef int CGSConnectionID;
|
||||
CGError CGSSetConnectionProperty(CGSConnectionID cid, CGSConnectionID targetCID, CFStringRef key, CFTypeRef value);
|
||||
int _CGSDefaultConnection();
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
class CCondVar;
|
||||
class CEventQueueTimer;
|
||||
|
@ -113,6 +120,10 @@ private:
|
|||
|
||||
bool onKey(CGEventRef event);
|
||||
bool onHotKey(EventRef event) const;
|
||||
|
||||
// Added here to allow the carbon cursor hack to be called.
|
||||
void showCursor();
|
||||
void hideCursor();
|
||||
|
||||
// map mac mouse button to synergy buttons
|
||||
ButtonID mapMacButtonToSynergy(UInt16) const;
|
||||
|
@ -168,6 +179,10 @@ private:
|
|||
CGEventType type,
|
||||
CGEventRef event,
|
||||
void* refcon);
|
||||
static CGEventRef handleCGInputEventSecondary(CGEventTapProxy proxy,
|
||||
CGEventType type,
|
||||
CGEventRef event,
|
||||
void* refcon);
|
||||
private:
|
||||
struct CHotKeyItem {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue