Menu

#7 SPNav X11 API inconsistency

open
None
5
2012-08-02
2012-08-02
No

This is a mixture of bug/feature request. My application dynamically opens and closes multiple Display connections and windows to the same X server, which clashes with the current API. For me, the ideal API would be:

int spnav_x11_open(Display *dpy, Window win);

int spnav_x11_close(Display *dpy, Window win);

... where the open call does a spnav_open on the first call, and only a spnav_x11_window on subsequent calls. Likewise, spnav_x11_close, does a spnav_close on the last close.

With the current API I can implement multiple window support on a single Display by using spnav_x11_window, refcounting and calling spnav_close, but I'm loosing spacemouse events if I close all windows and the Display connection.

I can give more background if needed, but imo the proposed API is more consistent even for single-window, single-Display use.

Discussion

  • Stefan Eilemann

    Stefan Eilemann - 2012-08-02
    • assigned_to: nobody --> christian_bay
     

Log in to post a comment.

MongoDB Logo MongoDB