8

On Windows you can "capture" the mouse to continue receiving mouse events even when it goes outside the window's client area. Here the SetCapture() documentation: http://msdn.microsoft.com/en-us/library/ms646262(VS.85).aspx

I would like to know what is the equivalent function in Linux (X11) and Mac OS X (Cocoa).

dacap
  • 478
  • 3
  • 19

2 Answers2

5

For X: XGrabPointer()

alanc
  • 4,102
  • 21
  • 24
1

I don't think there's a direct Mac equivalent, but I guess you could make a transparent overlay window to grab the events.

JWWalker
  • 22,385
  • 6
  • 55
  • 76