From 20741c8fc58206cdae6a6bafc8fd8b973543ff4b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 10 Oct 2011 15:44:44 -0600 Subject: [PATCH] third attempt to fix 64-bit Lion hidden-window problem After all the previous attempts, the problem seems almost trivial: although Apple documents `NSAnyEventMask' as the constant #xFFFFFFFF, it's actually NSUIntegerMax (and the difference matters in 64-bit mode). Merge to 5.2. original commit: dc912ee6def7a6e8b4edc13c230b367761c5c722 --- collects/mred/private/wx/cocoa/const.rkt | 2 -- collects/mred/private/wx/cocoa/queue.rkt | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wx/cocoa/const.rkt b/collects/mred/private/wx/cocoa/const.rkt index d2f99cb3..63e6b8a7 100644 --- a/collects/mred/private/wx/cocoa/const.rkt +++ b/collects/mred/private/wx/cocoa/const.rkt @@ -16,8 +16,6 @@ (define NSRoundedBezelStyle 1) (define NSRegularSquareBezelStyle 2) -(define NSAnyEventMask #xffffffff) - (define NSLeftMouseDown 1) (define NSLeftMouseUp 2) (define NSRightMouseDown 3) diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index d0ac5d21..67af3656 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -312,6 +312,8 @@ (custodian-shutdown-all c))))))) (set! was-menu-bar #f))) +(define NSAnyEventMask (sub1 (arithmetic-shift 1 (* 8 (ctype-sizeof _NSUInteger))))) + ;; Call this function only in atomic mode: (define (check-one-event wait? dequeue?) (pre-event-sync wait?)