We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 749

Summary: No windowID in SDL_ProximityEvent
Product: SDL Reporter: Ken Bull <llubnek>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P4 CC: llubnek
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: patch to add windowID to SDL_ProximityEvent

Description Ken Bull 2009-06-04 23:48:47 UTC
No windowID here, so what is x, y relative to?


include/events.h:
 330 typedef struct SDL_ProximityEvent
 331 {
 332     Uint8 type;
 333     Uint8 which;
 334     int cursor;
 335     int x;
 336     int y;
 337 } SDL_ProximityEvent;

src/events/SDL_mouse_c.h:
 120 /* Send a proximity event for a mouse */
 121 extern int SDL_SendProximity(int id, int x, int y, int type);


Affected files/lines/code:
include/events.h                  330-337   SDL_ProximityEvent

src/events/SDL_mouse.c            352-380   SDL_SendProximity
src/events/SDL_mouse_c.h          121       SDL_SendProximity

src/video/win32/SDL_win32events.c 151-166   calls SDL_SendProximity
src/video/x11/SDL_x11events.c     339-352   calls SDL_SendProximity

test/testmmousetablet.c                     add test for windowID
Comment 1 Ken Bull 2009-06-09 08:48:38 UTC
Created attachment 329 [details]
patch to add windowID to SDL_ProximityEvent

not tested.  Still need to make sure it works.
Create an application which opens two or more windows and prints out the windowID or draws to the window whenever a proximity event is triggered.  Verify that the windowID is different for different windows, but same for same window, and that the correct windowID is actually correct.
Comment 2 Ryan C. Gordon 2009-12-15 22:37:32 UTC
Changing bug priorities...

--ryan.
Comment 3 Sam Lantinga 2010-07-12 22:06:03 UTC
The proximity event is going away, at least for now.