Fyrox icon indicating copy to clipboard operation
Fyrox copied to clipboard

Input issues with Gnome X11

Open ghost opened this issue 3 years ago • 16 comments

So my charchter continued to walk thought I stopped pressing on the button. This Doesen't happen when use movements one at a time. Also there was problems with charachter obeying commands late. This only happens with the keyboard, no such things happens with mouse. This is probably some issue with the keyboard event handling.

ghost avatar May 23 '21 17:05 ghost

There's no such an issue with simple or terrain example, but present in 3rd_person, StationIapetus and rusty-shooter

ghost avatar May 23 '21 17:05 ghost

It looks like winit issue, rg3d does not handle input in any kind. It would be cool, if you make minimal working example.

mrDIMAS avatar May 24 '21 09:05 mrDIMAS

Trigger of the problem is actually resizing the windows. But that's works only with examples. StationIapetus and rusty-shooter have this issues when they're both default size and modified size. Maybe because they're manually resized by code?

BTW I found some artifacts in while running examples...

ghost avatar May 24 '21 20:05 ghost

@mrDIMAS Do you still have the input issue mentioned here ? #10 Are they related ?

Eragonfr avatar May 27 '21 08:05 Eragonfr

@Eragonfr No. There weren't any input issues on wayland.

ghost avatar May 27 '21 12:05 ghost

I know, I'm on wayland. But mrDIMAS had mentioned Input issues from his tests. So I'm asking if his issues are still here, and if they can be related to this one.

As I know when I opened the other issue mrDIMAS was only testing on a VM of Ubuntu with the default GNOME X11 DE

Eragonfr avatar May 27 '21 13:05 Eragonfr

@mrDIMAS simple example. that's the minimal working example.

ghost avatar Jun 06 '21 16:06 ghost

in ui example.

at line 474 there's a comment about winit not sending Resized event.

ghost avatar Jun 13 '21 23:06 ghost

https://imgur.com/a/jTpwgqc

ghost avatar Jun 13 '21 23:06 ghost

https://github.com/rust-windowing/winit/issues/1806

ghost avatar Jun 13 '21 23:06 ghost

whoops.

ghost avatar Jul 05 '21 09:07 ghost

Update: the issue differs on different videocards. I'm more than sure that this is the problem with rg3d, not winit.

ghost avatar Jul 07 '21 17:07 ghost

I noticed the same issue under X11, while everything is fine on Wayland.

In my case, it's kind of "special": camera movement is controlled using W (forwards) and S (backwards) keys, as well as the mouse to rotate the camera. Hitting W makes my camera start moving without any delay. Then I keep the W key pressed for some seconds to move for some longer time, then release the W key. Now there is quite a noticeable delay before movement stops. However, during that delay, I can still control the camera rotation using my mouse. So my application reacts to mouse input correctly and without any delay, but the "W key released" event is probably queued up somewhere (along with lots of "this is a reminder that the W key is still pressed!" events?) and waiting to be processed.

I don't really care about X11 so I don't feel like investigating this further right now, but looking at how those key input events are transferred from the X server through winit (and possibly other crates) to rg3d might be a good start. Maybe there's some event queue in there somewhere that is not getting polled frequently enough and has events piling up while holding a key?

w-flo avatar Oct 14 '21 13:10 w-flo

There has been quite some modifications done to the engine since the last comment. Do you still have this bug ? @w-flo @Voodlaz

Eragonfr avatar Feb 14 '23 12:02 Eragonfr

I can't test right now, my code uses an old version of what used to be called rg3d. I guess there have been enough breaking changes since then to make the upgrade somewhat time-consuming, and I have some custom patches applied to rg3d (e.g. to use a simple forward rendering pipeline instead of deferred).

So if there is nobody else to test if this is still an issue, feel free to close it. Once/If I get around to updating my code, I will test and leave another comment.

w-flo avatar Feb 15 '23 07:02 w-flo

Could somebody please re-check this issue? I updated the engine to winit 0.29 which has a brand new input system and this issue might be fixed as well.

mrDIMAS avatar Aug 08 '23 08:08 mrDIMAS