Bug#798265: Please apply upstream mouse event duplication patch
2015-11-01 8:36 GMT+00:00 RjY: > Manuel A. Fernandez Montecelo wrote: > > [...] > >>So now we try to be more cautious and to avoid cherry-picking fixes >>(unless they are critical fixes), unless they were going to be released >>imminently > > Upstream first. I quite understand. No problem, I can live with > continuing to patch my local copy for now. It's not exactly "upstream first" -- but the effects are almost the same. The problem is that even if we backport patches already added upstream (in their VCS at least), we don't know when they are going to be released (t has been years from the last one), or if they are modified or reverted before appearing in the real releases. All of these cases happened in the recent past. So yes, I think that the idea is the same, even if they already accepted some of the patches upstream :) >>but we don't have this guarantee anymore. Upstream did not >>release a simple 2.0.4 bugfix release (or anything else) in more than 19 >>months, while lots and lots of changes pile up every month without any >>clear indication of what's considered to be stable and what is not. >> >>We already tried to encourage upstream in different ways to try to get >>regular bugfix releases, but we failed so far. If you think that you >>can influence them, please go ahead :) > > Heh, they wouldn't know me from Adam. :) > > Best I can tell, the SDL2 developers' employer has pulled them off it, > to work on a commercial game. There's a lesson in this, somewhere. :( > > http://permalink.gmane.org/gmane.comp.lib.sdl/71042 > http://forums.libsdl.org/viewtopic.php?p=48819#48819 > > (I apologise for spreading rumours if this turns out not to be the case. > It is just a post on a mailing list after all.) It's a bit strange... they released 2.0, then 2.0.1-2-and-3 in quick succession, then stopped, and that's more than 1.5 years ago. Even if the recent lack of activity is because of that, I think that there might have been more reasons why it has not been done in the longer period... So, well, whatever it is, let's hope that they decide to release 2.0.4 soon. Cheers. -- Manuel A. Fernandez Montecelo
Bug#798265: Please apply upstream mouse event duplication patch
Manuel A. Fernandez Montecelo wrote: [...] >So now we try to be more cautious and to avoid cherry-picking fixes >(unless they are critical fixes), unless they were going to be released >imminently Upstream first. I quite understand. No problem, I can live with continuing to patch my local copy for now. >but we don't have this guarantee anymore. Upstream did not >release a simple 2.0.4 bugfix release (or anything else) in more than 19 >months, while lots and lots of changes pile up every month without any >clear indication of what's considered to be stable and what is not. > >We already tried to encourage upstream in different ways to try to get >regular bugfix releases, but we failed so far. If you think that you >can influence them, please go ahead :) Heh, they wouldn't know me from Adam. :) Best I can tell, the SDL2 developers' employer has pulled them off it, to work on a commercial game. There's a lesson in this, somewhere. :( http://permalink.gmane.org/gmane.comp.lib.sdl/71042 http://forums.libsdl.org/viewtopic.php?p=48819#48819 (I apologise for spreading rumours if this turns out not to be the case. It is just a post on a mailing list after all.) -- http://rjy.org.uk/
Bug#798265: Please apply upstream mouse event duplication patch
2015-09-07 14:51 RjY: Source: libsdl2 Version: 2.0.2+dfsg1-7 Severity: wishlist Tags: patch fixed-upstream Please apply this patch, cherry-picked from unreleased 2.0.4 upstream: https://hg.libsdl.org/SDL/rev/957a6ed39ad0 as it fixes some very annoying mouse behaviour in SDL2. I was hoping (and waiting for many months, or year+ now) that 2.0.4 was released at some point, so we can package a "known milestone", and so we don't have to cherry pick fixes like this that people request us from time to time. Because of this cherry-picking, in the past the Debian packages caused subtle ABI changes or behaviours that people depended upon and diverged from the same versions in the rest of the distributions, or wrong patches that entered in Debian stable releases and later were reverted without us noticing for some time and without being able to drop them in the stable releases... So now we try to be more cautious and to avoid cherry-picking fixes (unless they are critical fixes), unless they were going to be released imminently, but we don't have this guarantee anymore. Upstream did not release a simple 2.0.4 bugfix release (or anything else) in more than 19 months, while lots and lots of changes pile up every month without any clear indication of what's considered to be stable and what is not. We already tried to encourage upstream in different ways to try to get regular bugfix releases, but we failed so far. If you think that you can influence them, please go ahead :) Cheers. -- Manuel A. Fernandez Montecelo
Bug#798265: Please apply upstream mouse event duplication patch
Source: libsdl2 Version: 2.0.2+dfsg1-7 Severity: wishlist Tags: patch fixed-upstream Please apply this patch, cherry-picked from unreleased 2.0.4 upstream: https://hg.libsdl.org/SDL/rev/957a6ed39ad0 as it fixes some very annoying mouse behaviour in SDL2. -8<--- diff -r fd60d77139fc -r 957a6ed39ad0 src/video/x11/SDL_x11xinput2.c --- a/src/video/x11/SDL_x11xinput2.cMon Jun 08 01:52:43 2015 -0400 +++ b/src/video/x11/SDL_x11xinput2.cMon Jun 08 02:58:46 2015 -0400 @@ -136,15 +136,25 @@ case XI_RawMotion: { const XIRawEvent *rawev = (const XIRawEvent*)cookie->data; SDL_Mouse *mouse = SDL_GetMouse(); -double relative_cords[2]; +double relative_coords[2]; +static Time prev_time = 0; +static double prev_rel_coords[2]; if (!mouse->relative_mode || mouse->relative_mode_warp) { return 0; } parse_valuators(rawev->raw_values,rawev->valuators.mask, -rawev->valuators.mask_len,relative_cords,2); - SDL_SendMouseMotion(mouse->focus,mouse->mouseID,1,(int)relative_cords[0],(int)relative_cords[1]); +rawev->valuators.mask_len,relative_coords,2); + +if ((rawev->time == prev_time) && (relative_coords[0] == prev_rel_coords[0]) && (relative_coords[1] == prev_rel_coords[1])) { +return 0; /* duplicate event, drop it. */ +} + + SDL_SendMouseMotion(mouse->focus,mouse->mouseID,1,(int)relative_coords[0],(int)relative_coords[1]); +prev_rel_coords[0] = relative_coords[0]; +prev_rel_coords[1] = relative_coords[1]; +prev_time = rawev->time; return 1; } break; ->8--- -- http://rjy.org.uk/