From 676fa39f9ade5d89c5f5e70015025267afc4b84f Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 1 Nov 2021 05:53:20 +0200 Subject: [PATCH] lib/platform: Switch remaining ObjC source files to ObjC++ --- src/lib/platform/{OSXDragSimulator.m => OSXDragSimulator.mm} | 0 src/lib/platform/{OSXDragView.m => OSXDragView.mm} | 0 .../{OSXMediaKeySimulator.m => OSXMediaKeySimulator.mm} | 4 ++-- .../platform/{OSXMediaKeySupport.m => OSXMediaKeySupport.mm} | 4 ++-- .../{OSXPasteboardPeeker.m => OSXPasteboardPeeker.mm} | 0 .../platform/{OSXScreenSaverUtil.m => OSXScreenSaverUtil.mm} | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename src/lib/platform/{OSXDragSimulator.m => OSXDragSimulator.mm} (100%) rename src/lib/platform/{OSXDragView.m => OSXDragView.mm} (100%) rename src/lib/platform/{OSXMediaKeySimulator.m => OSXMediaKeySimulator.mm} (96%) rename src/lib/platform/{OSXMediaKeySupport.m => OSXMediaKeySupport.mm} (97%) rename src/lib/platform/{OSXPasteboardPeeker.m => OSXPasteboardPeeker.mm} (100%) rename src/lib/platform/{OSXScreenSaverUtil.m => OSXScreenSaverUtil.mm} (100%) diff --git a/src/lib/platform/OSXDragSimulator.m b/src/lib/platform/OSXDragSimulator.mm similarity index 100% rename from src/lib/platform/OSXDragSimulator.m rename to src/lib/platform/OSXDragSimulator.mm diff --git a/src/lib/platform/OSXDragView.m b/src/lib/platform/OSXDragView.mm similarity index 100% rename from src/lib/platform/OSXDragView.m rename to src/lib/platform/OSXDragView.mm diff --git a/src/lib/platform/OSXMediaKeySimulator.m b/src/lib/platform/OSXMediaKeySimulator.mm similarity index 96% rename from src/lib/platform/OSXMediaKeySimulator.m rename to src/lib/platform/OSXMediaKeySimulator.mm index 5aacd107..efc4251b 100644 --- a/src/lib/platform/OSXMediaKeySimulator.m +++ b/src/lib/platform/OSXMediaKeySimulator.mm @@ -85,8 +85,8 @@ fakeNativeMediaKey(KeyID id) data2:-1]; CGEventRef upEvent = [upRef CGEvent]; - CGEventPost(0, downEvent); - CGEventPost(0, upEvent); + CGEventPost(kCGHIDEventTap, downEvent); + CGEventPost(kCGHIDEventTap, upEvent); return true; } diff --git a/src/lib/platform/OSXMediaKeySupport.m b/src/lib/platform/OSXMediaKeySupport.mm similarity index 97% rename from src/lib/platform/OSXMediaKeySupport.m rename to src/lib/platform/OSXMediaKeySupport.mm index 9c9dbc31..a4d57679 100644 --- a/src/lib/platform/OSXMediaKeySupport.m +++ b/src/lib/platform/OSXMediaKeySupport.mm @@ -147,8 +147,8 @@ fakeNativeMediaKey(KeyID id) data2:-1]; CGEventRef upEvent = [upRef CGEvent]; - CGEventPost(0, downEvent); - CGEventPost(0, upEvent); + CGEventPost(kCGHIDEventTap, downEvent); + CGEventPost(kCGHIDEventTap, upEvent); return true; } diff --git a/src/lib/platform/OSXPasteboardPeeker.m b/src/lib/platform/OSXPasteboardPeeker.mm similarity index 100% rename from src/lib/platform/OSXPasteboardPeeker.m rename to src/lib/platform/OSXPasteboardPeeker.mm diff --git a/src/lib/platform/OSXScreenSaverUtil.m b/src/lib/platform/OSXScreenSaverUtil.mm similarity index 100% rename from src/lib/platform/OSXScreenSaverUtil.m rename to src/lib/platform/OSXScreenSaverUtil.mm