From b5f5373d2ce349d59f017ab672a5472ca302d06e Mon Sep 17 00:00:00 2001 From: hobbs2 Date: Tue, 27 Sep 2005 04:44:36 +0000 Subject: Hide cursor on OS X and capture display while grabbing --- ChangeLog | 1 + generic/tkTreeCtrl.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2a2f8af..c71a6cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * generic/tkTreeCtrl.c (LoupeCmd): add OS X support. Correct Win32 code to use grab size constraints and honor the virtual system metrics (OS X needs similar correction still). + Hide cursor on OS X and capture display while grabbing. 2005-09-25 Jeff Hobbs diff --git a/generic/tkTreeCtrl.c b/generic/tkTreeCtrl.c index 28532b7..6d0f895 100644 --- a/generic/tkTreeCtrl.c +++ b/generic/tkTreeCtrl.c @@ -7,7 +7,7 @@ * Copyright (c) 2002-2003 Christian Krone * Copyright (c) 2003-2005 ActiveState, a division of Sophos * - * RCS: @(#) $Id: tkTreeCtrl.c,v 1.55 2005/09/27 04:04:01 hobbs2 Exp $ + * RCS: @(#) $Id: tkTreeCtrl.c,v 1.56 2005/09/27 04:44:36 hobbs2 Exp $ */ #include "tkTreeCtrl.h" @@ -3669,6 +3669,8 @@ LoupeCmd( int bPerPixel, byPerRow, byPerPixel; // Gets all the screen info: + CGDisplayCapture(kCGDirectMainDisplay); + CGDisplayHideCursor(kCGDirectMainDisplay); bPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); byPerRow = CGDisplayBytesPerRow(kCGDirectMainDisplay); byPerPixel = bPerPixel / 8; @@ -3717,6 +3719,8 @@ LoupeCmd( *((unsigned int *)(pixelPtr + stepDest + xx * 4)) = newPixel; } } + CGDisplayShowCursor(kCGDirectMainDisplay); + CGDisplayRelease(kCGDirectMainDisplay); #else ximage = XGetImage(display, rootWindow, grabX, grabY, grabW, grabH, AllPlanes, ZPixmap); -- cgit v0.12