Re: [Pipmak-Devel] About the mouse un-grabbing in Pipmak
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-01-02 10:12:41
|
Aidan Gauland wrote: >> Hmm. I'm not too happy with that solution, to be honest. How are users >> supposed to find that out? >> > Well, I knew that the node with the list of key-bindings would have to > be updated. Sure, but that's not enough IMHO. I don't think people will go and check the preferences screen to find out how to get their mouse back. And what about that point in the future when the preliminary key bindings are gone and there's a real GUI preferences screen? Your solution just seems like an unacceptable regression in user experience to me (compared to a working auto-ungrab - of course the bug that prevents you and Urs from ungrabbing needs to be fixed). I'd rather fix this right than incorporate a workaround, even temporarily, that makes it worse where it worked before. Perhaps I need to explain why we grab the mouse at all in joystick mode - here's what I wrote about it in the commit message of rev. 123: Reworked mouse motion handling once more: The new seamless switching between mouse modes (see demo r124) made SDL's deficiencies (jumps in mouse position when grabbing or ungrabbing) really apparent. Now, the mouse is always grabbed in both mouse modes; in windowed mode, it can be ungrabbed by moving it out of the window against a slight edge resistance (which has the added benefit of making it easier to reach the edges of the window, e.g. for the inventory, on Windows and X11, where SDL sends no mouse events when the mouse is outside of the window). > could you please point me in the direction of a detailed SDL reference The most up-to-date SDL documentation is here: <http://www.libsdl.org/cgi/docwiki.cgi/SDL_20API>. It's probably not much more elaborate than the man pages, though. > or tell me how to get the coordinates for the unclamped mouse from within Pipmak. You can't get these directly from SDL, you need to keep track of them in your own variables by adding up the deltas from SDL_MOUSEMOTION events (these are unclamped when the mouse is grabbed). How to best keep this in sync with mouseX/mouseY is another question. > I will attach the patch I have made, to this message, as a quick fix for > people having this problem Thanks! As I alluded above, I won't apply it in its current form until I'm convinced that there's no better way to fix the problem. Some general comments nonetheless: - If you don't mind, please use unified diff format next time ('diff -u' if you use diff, 'svn diff' produces it by default). It's what most people are most familiar with. - Please use only tabs for indentation (you replaced some of them with spaces). > Sorry, I forgot to say this in my last message: you will need to pass > the -p 1 option to patch when you apply the patch I sent. That's apparent from the paths in the patch. > I would like to continue working on improving Pipmak's current behaviour. Very welcome! Don't hesitate to come here for help. If you're quick (or if I'm slow), we might get your changes into the 0.2.7 release I'm currently working on. (I originally planned to have it done this week, but I'm starting to doubt it. I'm currently putting the final touches on the Lua command line, next up are Andrea's bugs, and the demo project also needs expansion to include the new features.) -Christian |