Now it got interesting, one of the five computers did show the appropriate mouse behaviour! Therefore I conducted a test with five different Arch Linux empowered computers at home, all newly updated and with Wayland active. I must conclude that this problem cannot really be related to SDL, and that Steam is probably trying to move the cursor on a lower level (since it responds, even though insufficiently). Then again, Steam does in fact make an invisible cursor move, so probably they tried to do something of their own here. My above test did not reproduce this, so perhaps there is something else or something additional going on here. However, there is one thing here that does not add up, and that is that Steam actually manage to produce an invisible mouse that triggers hover highlights etc and reacts properly to clicks (but without moving the actual cursor). Perhaps it solves itself in the next update of SDL. In Steam's defence they do not officially to support Wayland since SteamOS use X11, but still I think they will need to do it soon. Another interesting thing that came from this test is that the SDL_PollEvent does not really work in Wayland either since it seems to miss events (the close event in this example), and I have experienced exactly the same from Steam. The SDL_WarpMouseGlobal function does nothing for Wayland, and this might very well be how Steam try to do it as well. It turns out that this in fact works perfectly in X11, but not at all in Wayland. Std::this_thread::sleep_for(std::chrono::milliseconds(1000)) SDL_WarpMouseGlobal(0, 0) // Should put the cursor in top left corner (0, 0). SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0) SDL_Window * screen = SDL_CreateWindow("Mouse cursor test", Int32_t main(int32_t a_argc, char *a_argv) Last edited by conchyliferous ( 21:24:34) Might it be that Steam emulates the mouse movement from hidraw into something that Wayland understands, but somehow only the position of the pointer but not the position of the cursor icon? So, I think the problem is both Wayland and Steam related, but I don't know exactly how. When using X11: The mouse emulation works even without the Steam client started (I could not test this now, but I'm quite certain this was the case when I last did) Edit: Steam needs to be on However, there is controller related output from 'cat /dev/hidraw4' exactly as in case 1.ģ. When using Wayland and if the Steam client is not started: The mouse pointer does not move and there is no invisible pointer. The pointer works in all parts of Gnome, not only in Steam.Ģ. When using Wayland and if the Steam client is started: The mouse pointer does not move and there is an invisible pointer (as described above). I looked a little bit more on this now and found one more clue to the problem.ġ. Last edited by conchyliferous ( 14:49:25) Can this be claimed to be a Wayland bug, or a combination of different things in the distro?Ī clue to what might be wrong is that the Steam Controller does not generate a uinput device, but rather a hidraw device, is that not handled by Wayland in the same way as in X11? Is it possible to pipe between hidraw and uinput? So far I have not found a fix, and I do not really know where to turn. Something related is described here, but I cannot really see if this is the same thing (a clean-up of that text would be nice): FTL) where the game designers added an extra layer of emulation (virtual pointer and real pointer might end up in different positions). Darkest Dungeon), but not in others (e.g. This happens on the Gnome Shell, and in most modern games (e.g. When using a normal mouse the pointer starts moving again, interestingly from it's original position (not from where the emulation last put it). Summary: The mouse pointer is there and it's moving around (can be seen from GUI highlights and click events etc), but the pointer is stuck. I know there are a few others that have this problem, for example here: It has been like this since Wayland was forced into our lives (in the long run this is a good thing). Most things work well in my life right now, except for mouse emulation in Wayland with the Steam Controller.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |