FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.77k stars 354 forks source link

Possible bad mouse coordinate interpretations (Arch Linux) #159

Open wilsonk opened 3 years ago

wilsonk commented 3 years ago

When I run the 3rd_person demo on Linux the scene just spins around rapidly with my mouse movements. I use a program called Synergy by Symless, so that I can just use one mouse on Mac/Win/Lin, and I thought maybe this was the problem. I have a mouse directly attached on the linux machine and it works fine with the 3rd_person example. I also noticed that the scene moves even when my mouse is outside the rg3d window (is this intended behavior?).

Then another user (roman205 on discord) mentioned he had the same problem with a Ubuntu Linux guest VM on a Win10 host! So some sort of bad interpretation is happening when using a vm or other 'mouse control' program, I guess?

Trying to look deeper into this, I compiled some bevy examples (because bevy uses winit also), particularly the mouse_input_events example. The bevy program also captures events outside the examples window but there are some differences with the captured info. Example:

Aug 23 03:52:08.524  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 03:52:08.524  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -1.0) }
Aug 23 03:52:08.540  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -2.0) }
Aug 23 03:52:08.540  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -1.0) }
Aug 23 03:52:08.557  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -2.0) }
Aug 23 03:52:08.557  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, -1.0) }
Aug 23 03:52:08.574  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 03:52:08.574  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 03:52:08.607  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 03:52:08.640  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 03:52:08.674  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 03:52:08.690  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 03:52:08.690  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, -1.0) }
Aug 23 03:52:08.957  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 03:52:10.607  INFO mouse_input_events: MouseMotion { delta: Vec2(1772.0, 422.0) }
Aug 23 03:52:10.607  INFO mouse_input_events: MouseMotion { delta: Vec2(1774.0, 422.0) }
Aug 23 03:52:10.807  INFO mouse_input_events: MouseMotion { delta: Vec2(1776.0, 423.0) }
Aug 23 03:52:10.824  INFO mouse_input_events: MouseMotion { delta: Vec2(1779.0, 423.0) }
Aug 23 03:52:10.824  INFO mouse_input_events: MouseMotion { delta: Vec2(1781.0, 423.0) }
Aug 23 03:52:10.841  INFO mouse_input_events: MouseMotion { delta: Vec2(1785.0, 423.0) }
Aug 23 03:52:10.841  INFO mouse_input_events: MouseMotion { delta: Vec2(1786.0, 425.0) }
Aug 23 03:52:10.857  INFO mouse_input_events: MouseMotion { delta: Vec2(1788.0, 425.0) }
Aug 23 03:52:10.857  INFO mouse_input_events: MouseMotion { delta: Vec2(1790.0, 425.0) }
Aug 23 03:52:10.857  INFO mouse_input_events: MouseMotion { delta: Vec2(1793.0, 425.0) }
Aug 23 03:52:10.874  INFO mouse_input_events: MouseMotion { delta: Vec2(1797.0, 425.0) }
Aug 23 03:52:10.891  INFO mouse_input_events: MouseMotion { delta: Vec2(1799.0, 425.0) }
Aug 23 03:52:11.041  INFO mouse_input_events: MouseMotion { delta: Vec2(1798.0, 427.0) }
Aug 23 03:52:11.057  INFO mouse_input_events: MouseMotion { delta: Vec2(1794.0, 428.0) }
Aug 23 03:52:11.057  INFO mouse_input_events: MouseMotion { delta: Vec2(1793.0, 430.0) }
Aug 23 03:52:11.074  INFO mouse_input_events: MouseMotion { delta: Vec2(1789.0, 430.0) }
Aug 23 03:52:11.074  INFO mouse_input_events: MouseMotion { delta: Vec2(1789.0, 432.0) }
Aug 23 03:52:23.558  INFO mouse_input_events: MouseMotion { delta: Vec2(2.0, 0.0) }
Aug 23 03:52:23.575  INFO mouse_input_events: MouseMotion { delta: Vec2(2.0, 0.0) }
Aug 23 03:52:23.575  INFO mouse_input_events: MouseMotion { delta: Vec2(3.0, 0.0) }
Aug 23 03:52:23.592  INFO mouse_input_events: MouseMotion { delta: Vec2(2.0, 0.0) }
Aug 23 03:52:23.592  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 03:52:23.675  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 03:52:23.708  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 03:52:23.742  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 03:52:23.875  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 03:52:23.875  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }

So at the start (outside the bevy window) there are captured events when using the directly attached mouse, then in the middle of that output I use the 'symless' mouse. Notice the different coords! I would postulate that this difference in coords is the cause of the spinning scene in the 3rd_person example, assuming you are using the Deltas!?!

I also captured this from INSIDE the window, while using both mice:

Aug 23 04:20:13.531  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1273.4546, 719.2727) }
Aug 23 04:20:13.531  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1273.4546, 719.2727) }
Aug 23 04:20:13.579  INFO mouse_input_events: MouseMotion { delta: Vec2(3719.0, 1167.0) }
Aug 23 04:20:13.579  INFO mouse_input_events: MouseMotion { delta: Vec2(3718.0, 1167.0) }
Aug 23 04:20:13.579  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1273.4546, 718.5455) }
Aug 23 04:20:13.579  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1272.7273, 718.5455) }
Aug 23 04:20:13.696  INFO mouse_input_events: MouseMotion { delta: Vec2(3718.0, 1169.0) }
Aug 23 04:20:13.696  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1272.7273, 717.0909) }
Aug 23 04:20:13.712  INFO mouse_input_events: MouseMotion { delta: Vec2(3716.0, 1169.0) }
Aug 23 04:20:13.712  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1271.2727, 717.0909) }
Aug 23 04:20:13.879  INFO mouse_input_events: MouseMotion { delta: Vec2(3716.0, 1171.0) }
Aug 23 04:20:13.879  INFO mouse_input_events: MouseMotion { delta: Vec2(3714.0, 1171.0) }
Aug 23 04:20:13.879  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1271.2727, 715.63635) }
Aug 23 04:20:13.879  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.8182, 715.63635) }
Aug 23 04:20:14.096  INFO mouse_input_events: MouseMotion { delta: Vec2(3714.0, 1172.0) }
Aug 23 04:20:14.096  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.8182, 714.9091) }
Aug 23 04:20:14.113  INFO mouse_input_events: MouseMotion { delta: Vec2(3712.0, 1172.0) }
Aug 23 04:20:14.113  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.3636, 714.9091) }
Aug 23 04:20:14.246  INFO mouse_input_events: MouseMotion { delta: Vec2(3712.0, 1174.0) }
Aug 23 04:20:14.246  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.3636, 713.4545) }
Aug 23 04:20:14.296  INFO mouse_input_events: MouseMotion { delta: Vec2(3711.0, 1174.0) }
Aug 23 04:20:14.296  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1267.6364, 713.4545) }
Aug 23 04:20:14.529  INFO mouse_input_events: MouseMotion { delta: Vec2(3709.0, 1176.0) }
Aug 23 04:20:14.529  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1266.1818, 712.0) }
Aug 23 04:20:14.546  INFO mouse_input_events: MouseMotion { delta: Vec2(3709.0, 1179.0) }
Aug 23 04:20:14.546  INFO mouse_input_events: MouseMotion { delta: Vec2(3707.0, 1186.0) }
Aug 23 04:20:14.546  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1266.1818, 709.8182) }
Aug 23 04:20:14.546  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.7273, 704.7273) }
Aug 23 04:20:14.563  INFO mouse_input_events: MouseMotion { delta: Vec2(3702.0, 1196.0) }
Aug 23 04:20:14.563  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1197.0) }
Aug 23 04:20:14.563  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.091, 697.4545) }
Aug 23 04:20:14.563  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 696.7273) }
Aug 23 04:20:14.729  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1199.0) }
Aug 23 04:20:14.729  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 695.2727) }
Aug 23 04:20:14.796  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1201.0) }
Aug 23 04:20:14.796  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1202.0) }
Aug 23 04:20:14.796  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 693.8182) }
Aug 23 04:20:14.796  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 693.0909) }
Aug 23 04:20:14.896  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1204.0) }
Aug 23 04:20:14.896  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 691.63635) }
Aug 23 04:20:15.046  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1203.0) }
Aug 23 04:20:15.046  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 692.36365) }
Aug 23 04:20:15.063  INFO mouse_input_events: MouseMotion { delta: Vec2(3700.0, 1202.0) }
Aug 23 04:20:15.063  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1259.6364, 693.0909) }
Aug 23 04:20:18.163  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:18.163  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1260.2462, 693.7008) }
Aug 23 04:20:18.346  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:18.346  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1260.4982, 693.9527) }
Aug 23 04:20:18.363  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.363  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1260.4982, 694.35095) }
Aug 23 04:20:18.380  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.380  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1260.4982, 694.948) }
Aug 23 04:20:18.396  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:18.396  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.2163, 694.948) }
Aug 23 04:20:18.413  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.413  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.413  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.2163, 695.6661) }
Aug 23 04:20:18.413  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.2163, 696.38434) }
Aug 23 04:20:18.429  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.429  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.2163, 697.1116) }
Aug 23 04:20:18.446  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.446  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.2163, 697.815) }
Aug 23 04:20:18.463  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.463  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.2163, 698.4117) }
Aug 23 04:20:18.513  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:18.513  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1261.698, 698.8932) }
Aug 23 04:20:18.530  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:18.530  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1262.2535, 698.8932) }
Aug 23 04:20:18.546  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.546  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1262.2535, 699.4896) }
Aug 23 04:20:18.696  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:18.696  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1262.6488, 699.4896) }
Aug 23 04:20:18.730  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.730  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1262.6488, 699.88385) }
Aug 23 04:20:18.780  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:18.780  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:18.780  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1263.1138, 700.3489) }
Aug 23 04:20:18.780  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1263.788, 700.3489) }
Aug 23 04:20:18.796  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:18.796  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.506, 700.3489) }
Aug 23 04:20:18.830  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.830  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.506, 700.9156) }
Aug 23 04:20:18.880  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.880  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.506, 701.3307) }
Aug 23 04:20:18.913  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:18.913  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.506, 701.72046) }
Aug 23 04:20:18.963  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:18.963  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 701.72046) }
Aug 23 04:20:19.013  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.013  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 702.1086) }
Aug 23 04:20:19.064  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.064  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 702.46246) }
Aug 23 04:20:19.096  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.096  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 702.859) }
Aug 23 04:20:19.130  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.130  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.130  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 703.3506) }
Aug 23 04:20:19.130  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 704.0436) }
Aug 23 04:20:19.163  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.163  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.163  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 704.7365) }
Aug 23 04:20:19.163  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 705.36285) }
Aug 23 04:20:19.196  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.196  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:19.196  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.9109, 705.99) }
Aug 23 04:20:19.196  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1265.604, 706.68317) }
Aug 23 04:20:19.213  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:19.213  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:19.213  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1266.3313, 706.68317) }
Aug 23 04:20:19.213  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1267.0586, 707.4104) }
Aug 23 04:20:19.230  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:19.230  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 04:20:19.230  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1267.7859, 708.1377) }
Aug 23 04:20:19.230  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.5132, 708.865) }
Aug 23 04:20:19.280  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.280  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.280  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.5132, 709.53375) }
Aug 23 04:20:19.280  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.5132, 710.2025) }
Aug 23 04:20:19.313  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.313  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.313  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.5132, 710.8953) }
Aug 23 04:20:19.313  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.5132, 711.58813) }
Aug 23 04:20:19.380  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.380  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1268.5132, 712.249) }
Aug 23 04:20:19.396  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:19.396  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.0175, 712.249) }
Aug 23 04:20:19.413  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.413  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:19.413  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.0175, 712.9525) }
Aug 23 04:20:19.413  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 712.9525) }
Aug 23 04:20:19.480  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.480  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 713.6166) }
Aug 23 04:20:19.496  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.496  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 714.0512) }
Aug 23 04:20:19.530  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.530  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 714.5862) }
Aug 23 04:20:19.546  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.546  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.546  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 715.1969) }
Aug 23 04:20:19.546  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 715.9151) }
Aug 23 04:20:19.563  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.563  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 716.63336) }
Aug 23 04:20:19.580  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.580  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 717.2441) }
Aug 23 04:20:19.613  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.613  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1269.7446, 717.74115) }
Aug 23 04:20:19.630  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 04:20:19.630  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.630  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1270.425, 717.74115) }
Aug 23 04:20:19.630  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1270.425, 718.4684) }
Aug 23 04:20:19.680  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.680  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1270.425, 719.13715) }
Aug 23 04:20:19.713  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.713  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1270.425, 719.5252) }
Aug 23 04:20:19.763  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 04:20:19.763  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1270.425, 719.9133) }

The Deltas change again when using the 'symless' mouse, but the position vec2 seems consistent. Perhaps only working off of that position vector, while inside the rg3d window is a solution? Or perhaps you can see a solution with this information @mrDIMAS ?

mrDIMAS commented 3 years ago

That is so weird, I have no idea why it happens 😕

wilsonk commented 3 years ago

Btw, I don't think this is a real back breaker of an issue, since it is sort of specialized on there being a 'mouse control' program (ie. VM or synergy or something) running to cause this.

(I wouldn't be gaming with this synergy app running and would have a mouse directly plugged into my machine anyways.)

And it appears to be Linux only. Here is the bevy mouse_input_event examples output on Win10:

Aug 23 05:25:43.086  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.086  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.086  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.086  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1264.6666, 137.33331) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.120  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1270.0, 132.66669) }
Aug 23 05:25:43.153  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.153  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.153  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.153  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.153  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1272.0, 130.66669) }
Aug 23 05:25:43.183  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.183  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1272.0, 129.33331) }
Aug 23 05:25:43.253  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.253  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.253  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1273.3334, 128.66669) }
Aug 23 05:25:43.287  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.287  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.287  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.287  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.287  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1276.0, 126.0) }
Aug 23 05:25:43.319  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.320  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.320  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1276.6666, 125.33331) }
Aug 23 05:25:43.353  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.353  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.353  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1278.0, 124.0) }
Aug 23 05:25:43.387  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.387  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:43.387  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:43.387  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1279.3334, 121.33331) }
Aug 23 05:25:43.420  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:44.354  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:47.390  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:48.658  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:48.692  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:48.757  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 3.0) }
Aug 23 05:25:48.792  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 4.0) }
Aug 23 05:25:48.792  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:48.923  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:48.923  INFO mouse_input_events: MouseMotion { delta: Vec2(10.0, -1.0) }
Aug 23 05:25:48.959  INFO mouse_input_events: MouseMotion { delta: Vec2(14.0, -1.0) }
Aug 23 05:25:48.959  INFO mouse_input_events: MouseMotion { delta: Vec2(15.0, -3.0) }
Aug 23 05:25:48.960  INFO mouse_input_events: MouseMotion { delta: Vec2(12.0, -5.0) }
Aug 23 05:25:48.960  INFO mouse_input_events: MouseMotion { delta: Vec2(12.0, -6.0) }
Aug 23 05:25:48.960  INFO mouse_input_events: MouseMotion { delta: Vec2(11.0, -7.0) }
Aug 23 05:25:48.992  INFO mouse_input_events: MouseMotion { delta: Vec2(8.0, -6.0) }
Aug 23 05:25:48.992  INFO mouse_input_events: MouseMotion { delta: Vec2(10.0, -7.0) }
Aug 23 05:25:48.992  INFO mouse_input_events: MouseMotion { delta: Vec2(7.0, -8.0) }
Aug 23 05:25:48.992  INFO mouse_input_events: MouseMotion { delta: Vec2(8.0, -6.0) }
Aug 23 05:25:49.026  INFO mouse_input_events: MouseMotion { delta: Vec2(8.0, -6.0) }
Aug 23 05:25:49.026  INFO mouse_input_events: MouseMotion { delta: Vec2(6.0, -6.0) }
Aug 23 05:25:49.026  INFO mouse_input_events: MouseMotion { delta: Vec2(4.0, -4.0) }
Aug 23 05:25:49.026  INFO mouse_input_events: MouseMotion { delta: Vec2(3.0, -4.0) }
Aug 23 05:25:49.059  INFO mouse_input_events: MouseMotion { delta: Vec2(2.0, -2.0) }
Aug 23 05:25:49.059  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -3.0) }
Aug 23 05:25:49.060  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -2.0) }
Aug 23 05:25:49.060  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -2.0) }
Aug 23 05:25:52.695  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 2.0) }
Aug 23 05:25:52.695  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 4.0) }
Aug 23 05:25:52.730  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 4.0) }
Aug 23 05:25:52.730  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 7.0) }
Aug 23 05:25:52.730  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 8.0) }
Aug 23 05:25:52.730  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 7.0) }
Aug 23 05:25:52.764  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 8.0) }
Aug 23 05:25:52.764  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 6.0) }
Aug 23 05:25:52.764  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 5.0) }
Aug 23 05:25:52.764  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 5.0) }
Aug 23 05:25:52.764  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 4.0) }
Aug 23 05:25:52.794  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 2.0) }
Aug 23 05:25:52.795  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 2.0) }
Aug 23 05:25:52.795  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 05:25:52.830  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:52.929  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 05:25:52.963  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 05:25:52.963  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 1.0) }
Aug 23 05:25:52.963  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 05:25:52.963  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 05:25:52.993  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:52.993  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:52.993  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 1.0) }
Aug 23 05:25:52.993  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 1.0) }
Aug 23 05:25:53.030  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 2.0) }
Aug 23 05:25:53.030  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:53.030  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 2.0) }
Aug 23 05:25:53.030  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, 3.0) }
Aug 23 05:25:53.030  INFO mouse_input_events: MouseMotion { delta: Vec2(-6.0, 3.0) }
Aug 23 05:25:53.063  INFO mouse_input_events: MouseMotion { delta: Vec2(-6.0, 2.0) }
Aug 23 05:25:53.063  INFO mouse_input_events: MouseMotion { delta: Vec2(-7.0, 4.0) }
Aug 23 05:25:53.063  INFO mouse_input_events: MouseMotion { delta: Vec2(-7.0, 2.0) }
Aug 23 05:25:53.063  INFO mouse_input_events: MouseMotion { delta: Vec2(-6.0, 3.0) }
Aug 23 05:25:53.096  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, 1.0) }
Aug 23 05:25:53.096  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 1.0) }
Aug 23 05:25:53.096  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 0.0) }
Aug 23 05:25:53.096  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 2.0) }
Aug 23 05:25:53.129  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 1.0) }
Aug 23 05:25:53.130  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 2.0) }
Aug 23 05:25:53.130  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 1.0) }
Aug 23 05:25:53.130  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:53.130  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:53.159  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 1.0) }
Aug 23 05:25:53.159  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 2.0) }
Aug 23 05:25:53.159  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 05:25:53.163  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 1.0) }
Aug 23 05:25:53.197  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 1.0) }
Aug 23 05:25:53.197  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 0.0) }
Aug 23 05:25:53.197  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 1.0) }
Aug 23 05:25:53.197  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 05:25:53.230  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:53.230  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:53.231  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 1.0) }
Aug 23 05:25:53.231  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 05:25:53.263  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 1.0) }
Aug 23 05:25:53.264  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 0.0) }
Aug 23 05:25:53.264  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, 1.0) }
Aug 23 05:25:53.264  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, 0.0) }
Aug 23 05:25:53.264  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 1.0) }
Aug 23 05:25:53.296  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, 0.0) }
Aug 23 05:25:53.296  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 0.0) }
Aug 23 05:25:53.296  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, 0.0) }
Aug 23 05:25:53.296  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, 0.0) }
Aug 23 05:25:53.327  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 05:25:53.327  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 0.0) }
Aug 23 05:25:53.327  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -1.0) }
Aug 23 05:25:53.327  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 0.0) }
Aug 23 05:25:53.364  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, 0.0) }
Aug 23 05:25:53.364  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, 0.0) }
Aug 23 05:25:53.364  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -1.0) }
Aug 23 05:25:53.364  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -1.0) }
Aug 23 05:25:53.397  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -1.0) }
Aug 23 05:25:53.397  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -1.0) }
Aug 23 05:25:53.397  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -3.0) }
Aug 23 05:25:53.397  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -4.0) }
Aug 23 05:25:53.397  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -4.0) }
Aug 23 05:25:53.397  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1262.0, 104.66669) }
Aug 23 05:25:53.430  INFO mouse_input_events: MouseMotion { delta: Vec2(-4.0, -5.0) }
Aug 23 05:25:53.430  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -6.0) }
Aug 23 05:25:53.430  INFO mouse_input_events: MouseMotion { delta: Vec2(-5.0, -5.0) }
Aug 23 05:25:53.430  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -5.0) }
Aug 23 05:25:53.430  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1233.3334, 145.33331) }
Aug 23 05:25:53.463  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -4.0) }
Aug 23 05:25:53.464  INFO mouse_input_events: MouseMotion { delta: Vec2(-3.0, -4.0) }
Aug 23 05:25:53.464  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -2.0) }
Aug 23 05:25:53.464  INFO mouse_input_events: MouseMotion { delta: Vec2(-2.0, -3.0) }
Aug 23 05:25:53.464  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1216.6666, 166.66669) }
Aug 23 05:25:53.497  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -2.0) }
Aug 23 05:25:53.497  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, -2.0) }
Aug 23 05:25:53.497  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -1.0) }
Aug 23 05:25:53.497  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1215.3334, 173.33331) }
Aug 23 05:25:54.431  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.431  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.431  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.431  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1215.3334, 170.0) }
Aug 23 05:25:54.496  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.496  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1215.3334, 169.33331) }
Aug 23 05:25:54.531  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.532  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1215.3334, 168.0) }
Aug 23 05:25:54.664  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.664  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1215.3334, 166.66669) }
Aug 23 05:25:54.731  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 4.0) }
Aug 23 05:25:54.732  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 5.0) }
Aug 23 05:25:54.732  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 3.0) }
Aug 23 05:25:54.732  INFO mouse_input_events: MouseMotion { delta: Vec2(-1.0, 3.0) }
Aug 23 05:25:54.732  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1214.0, 144.66669) }
Aug 23 05:25:54.765  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 2.0) }
Aug 23 05:25:54.765  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.765  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, 1.0) }
Aug 23 05:25:54.765  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1214.0, 140.0) }
Aug 23 05:25:54.964  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, 0.0) }
Aug 23 05:25:54.965  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1214.6666, 140.0) }
Aug 23 05:26:10.814  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -1.0) }
Aug 23 05:26:10.814  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -3.0) }
Aug 23 05:26:10.814  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -2.0) }
Aug 23 05:26:10.814  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -3.0) }
Aug 23 05:26:10.814  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1216.0, 151.33331) }
Aug 23 05:26:10.849  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -5.0) }
Aug 23 05:26:10.849  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -3.0) }
Aug 23 05:26:10.849  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -5.0) }
Aug 23 05:26:10.849  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -6.0) }
Aug 23 05:26:10.849  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1217.3334, 182.66669) }
Aug 23 05:26:10.881  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -5.0) }
Aug 23 05:26:10.881  INFO mouse_input_events: MouseMotion { delta: Vec2(0.0, -7.0) }
Aug 23 05:26:10.882  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -7.0) }
Aug 23 05:26:10.882  INFO mouse_input_events: MouseMotion { delta: Vec2(1.0, -8.0) }
Aug 23 05:26:10.882  INFO mouse_input_events: CursorMoved { id: WindowId(00000000-0000-0000-0000-000000000000), position: Vec2(1223.3334, 234.66666) }

You can see there is no real difference in the deltas, and the position vec2's are also consistent, even though I used both types of mouse during this test. Maybe someone can try a Win10 guest inside a VM to see if that works?

wilsonk commented 3 years ago

This is an issue with winit/glutin. See this issue: https://github.com/rust-windowing/winit/issues/946

romancerny commented 3 years ago

Hi, my discord username is roman205. I've had the same issue using VMWare Workstation 16 Player with Windows 10 host. My VM details are:

╰─ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal

╰─ rustc --version rustc 1.54.0 (a178d0322 2021-07-26)

╰─ rustup --version rustup 1.24.3 (ce5817a94 2021-05-31) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active rustc version is rustc 1.54.0 (a178d0322 2021-07-26)

╰─ cargo --version cargo 1.54.0 (5ae8d74b3 2021-06-22)

I followed https://superuser.com/a/1406565 to disable the mouse integration. After addeding: mks.gamingMouse.policy = "gaming" to my VM vmx file, the issue got resolved.

Calinou commented 3 years ago

There is usually no way to workaround this from the program itself. Instead, the documentation should instruct to disable mouse integration or absolute mouse coordinates. This is also an issue if you try to use a graphics tablet to play a game that captures the mouse :slightly_smiling_face:

wilsonk commented 3 years ago

@Calinou Turning off mouse integration can be done with VMWare, as stated above...and I also saw that VBox has a similar option to turn off mouse integration (qemu must have it also, as it has pretty much EVERY option). So, yes, I think a note in the README or something about turning off mouse integration if you are using a VM is a good idea.

Now, how does one turn of mouse integration when running synergy/barrier? I am not aware of a way to do this. How does one turn off mouse integration when running a tablet, unless that is programmatically? And/or how does one turn off absolute coordinates on a tablet?

P.S. By the way, this is only an issue on Linux desktop because of X11...Mac/Win10 desktop work fine. So instead of programmatically dealing with the X11 discrepancy we should turn off mouse integration for every OS? Not sure what your suggestion is exactly.

P.P.S The SDL library, at the least, deals with this issue programmatically (https://github.com/spurious/SDL-mirror/blob/d3d9a9ddd00f710835a3c133d6c196b7c4bd1792/src/events/SDL_mouse.c#L302). I think glutin/winit actually comment on this fact also (https://github.com/rust-windowing/winit/issues/946)