Brendan Shanks : winemac: Remove unused GetCurrentProcess() call.
Alexandre Julliard
julliard at winehq.org
Mon Oct 12 15:20:52 CDT 2020
Module: wine
Branch: master
Commit: 863683342ded500d3939f7ff66d2d9c1a4134caf
URL: https://source.winehq.org/git/wine.git/?a=commit;h=863683342ded500d3939f7ff66d2d9c1a4134caf
Author: Brendan Shanks <bshanks at codeweavers.com>
Date: Tue Oct 6 15:52:18 2020 -0700
winemac: Remove unused GetCurrentProcess() call.
Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winemac.drv/cocoa_app.m | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index b4dcbfff47..e296d4b4af 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -19,7 +19,6 @@
*/
#import <Carbon/Carbon.h>
-#include <dlfcn.h>
#import "cocoa_app.h"
#import "cocoa_event.h"
@@ -1332,8 +1331,6 @@ static NSString* WineLocalizedString(unsigned int stringID)
- (BOOL) installEventTap
{
- ProcessSerialNumber psn;
- OSErr err;
CGEventMask mask = CGEventMaskBit(kCGEventLeftMouseDown) |
CGEventMaskBit(kCGEventLeftMouseUp) |
CGEventMaskBit(kCGEventRightMouseDown) |
@@ -1346,31 +1343,10 @@ static NSString* WineLocalizedString(unsigned int stringID)
CGEventMaskBit(kCGEventOtherMouseDragged) |
CGEventMaskBit(kCGEventScrollWheel);
CFRunLoopSourceRef source;
- void* appServices;
- OSErr (*pGetCurrentProcess)(ProcessSerialNumber* PSN);
if (cursorClippingEventTap)
return TRUE;
- // We need to get the Mac GetCurrentProcess() from the ApplicationServices
- // framework with dlsym() because the Win32 function of the same name
- // obscures it.
- appServices = dlopen("/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices", RTLD_LAZY);
- if (!appServices)
- return FALSE;
-
- pGetCurrentProcess = dlsym(appServices, "GetCurrentProcess");
- if (!pGetCurrentProcess)
- {
- dlclose(appServices);
- return FALSE;
- }
-
- err = pGetCurrentProcess(&psn);
- dlclose(appServices);
- if (err != noErr)
- return FALSE;
-
// We create an annotated session event tap rather than a process-specific
// event tap because we need to programmatically move the cursor even when
// mouse moves are directed to other processes. We disable our tap when
More information about the wine-cvs
mailing list