You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.3 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2015-05-17 20:04:52 +0000, Dominik Tugend wrote:
Created attachment 2157
test program
On reasonable fast PCs with multi threading there is a problem with test programs (attached one) and also other progams using libSDL2 (i.e. the current Half-Life Steam version):
MouseWheel generates SDL_MOUSEBUTTONDOWN with SDL_BUTTON_X1 / SDL_BUTTON_X2 instead of SDL_MOUSEWHEEL.
I am affected myself on a Gentoo system and know of two Arch Linux users with the same problem.
When I break in that function named above with a debugger, then the SDL_MOUSEWHEEL event gets generated as it should, but if I don't break with a debugger, then it doesn't.
So at the moment I am guessing, that there are often simply no pending events that could be checked, meaning we cannot relay on the ButtonRlease events being there already :(
On my Gentoo system when not breaking in the debugger, I almost always get the button events instead.
For the two ArchLinux users, it seems to be more random, sometimes they get button events and sometimes mouse wheel events with their test programs.
Please let me know if I shall provide more information or s.th..
On 2015-05-17 20:14:13 +0000, Ivan Molodetskikh wrote:
(In reply to Dominik Tugend from comment # 0)
Created attachment 2157 [details]
test program
On reasonable fast PCs with multi threading there is a problem with test
programs (attached one) and also other progams using libSDL2 (i.e. the
current Half-Life Steam version):
MouseWheel generates SDL_MOUSEBUTTONDOWN with SDL_BUTTON_X1 / SDL_BUTTON_X2
instead of SDL_MOUSEWHEEL.
I am affected myself on a Gentoo system and know of two Arch Linux users
with the same problem.
When I break in that function named above with a debugger, then the
SDL_MOUSEWHEEL event gets generated as it should, but if I don't break with
a debugger, then it doesn't.
So at the moment I am guessing, that there are often simply no pending
events that could be checked, meaning we cannot relay on the ButtonRlease
events being there already :(
On my Gentoo system when not breaking in the debugger, I almost always get
the button events instead.
For the two ArchLinux users, it seems to be more random, sometimes they get
button events and sometimes mouse wheel events with their test programs.
Please let me know if I shall provide more information or s.th..
I'm one of the two Arch users mentioned. When I'm scrolling the wheel, the test program outputs sometimes the wheel messages properly, and sometimes instead of another wheel message it outputs SDL_BUTTON_X2 for mwheeldown and SDL_BUTTON_X1 for mwheelup. In Half-Life, I get it way more often and it is, respectively, mouse5 instead of mwheeldown and mouse4 instead of mwheelup.
We were checking things with xev, and it outputs wheel messages as ButtonPress immediately followed by ButtonRelease with identical time, as it should, without any errors.
On 2015-05-31 13:50:39 +0000, Daniel Gibson wrote:
I've observed the problem as well.
Probably sometimes, for whatever reason, the X11 button up event for the wheel does not happen at the same time as the button down event, but maybe in the next frame or something (so it still looks like "immediately" in xev).
I think X11 buttons 4 and 5 should always be recognized as wheel up/down and 6 and 7 as wheel left/right, without the call to X11_XCheckIfEvent()
This problem has also been discussed in https://bugzilla.libsdl.org/show_bug.cgi?id=2472 and while removing this change for the 2.0.4 release seems to risky, it'll probably be removed afterwards, so it'll be in 2.0.5 if it doesn't cause any trouble.
(if it does cause trouble, i.e. sometimes X11 buttons 4-7 are not actually vertical/horizontal scrollwheel events, XInput2 could be queried for the key names of those buttons to be sure of their meaning, I also described that in the other report)
On 2015-08-13 21:42:02 +0000, Ryan C. Gordon wrote:
On 2015-08-13 21:48:50 +0000, Daniel Gibson wrote:
hmm in "case ButtonRelease:" shouldn't SDL_SendMouseButton(...) be within if(!X11_IsWheelEvent(...)) { ... } ?
otherwise it will send a button event anyway and the comment is wrong.
On 2015-08-14 08:42:50 +0000, Dominik Tugend wrote:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.3
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2015-05-17 20:04:52 +0000, Dominik Tugend wrote:
On 2015-05-17 20:14:13 +0000, Ivan Molodetskikh wrote:
On 2015-05-31 13:50:39 +0000, Daniel Gibson wrote:
On 2015-08-13 21:42:02 +0000, Ryan C. Gordon wrote:
On 2015-08-13 21:48:50 +0000, Daniel Gibson wrote:
On 2015-08-14 08:42:50 +0000, Dominik Tugend wrote:
The text was updated successfully, but these errors were encountered: