New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wlfreerdp for weston , mouse wrong position after clicking #6722
Comments
can not reproduce, please add some more details. |
I use WLFREERDP to connect to server2019 |
@Kimcn sorry, video not available? |
I use debian freerdp2-wayland:2.2.0 , weston:9.0 |
@Kimcn could you retry with our nightlies https://github.com/FreeRDP/FreeRDP/wiki/PreBuilds and check if that has been fixed? |
Ok I testing thanks |
@akallabeth Still having the same problem I need help thanks |
@Kimcn ok, finally managed to reproduce. |
Just gave wlfreerdp a try (it fits in a very small - about 200Mb - usb image without X, which is very nice!) and found the mouse positioning issue there when connecting to Win10 RDP server. The same server but with xfreerdp works fine, - only the wlfreerdp is affected. The issues seems to be what is described there. In my case it is slightly different however. Mouse cursor loses its position when moving over a window border - it jumps some pixels. The position can be re-syncronized back by moving cursor to the edge of the screen (I always run wlfreerdp in fullscreen mode) - it fixes itself when touching the border. On regular gnome wayland session mouse is also broken but differently: the cursor drawn a bit higher than actual mouse position. Can it be the top panel under weston (the one with application icons and the date/time display on top of the screen)? This happens only in fullscreen mode (/f option) - in window mode things appears to be running fine (but under gnome in windows mode the window does not have title or border so one can't close it). Currently running debian bullseye version of wlfreerdp (2.3.0+dfsg1-2), but can try some debugging/recompiling for sure. |
Same things. I confirm, mouse position is incorrect when run wlfreerdp. When runnung iside xweston, also incorrect. But same xfreerdp running nice. Environment: $ weston-info *** Please use wayland-info instead interface: 'wl_compositor', version: 4, name: 1 interface: 'zwp_input_panel_v1', version: 1, name: 19
|
does weston draw a window bar with buttons on top? might be that these must be subtracted/added to the position, can´t reproduce here on my debian 11/gnome wayland setup. Only with weston. |
Hi) I make vido and post details after few min.11 окт. 2021 г. 20:08 пользователь akallabeth ***@***.***> написал:
does weston draw a window bar with buttons on top? might be that these must be subtracted/added to the position, can´t reproduce here on my debian 11/gnome weston setup.
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Please, see in detail. UPD: Video size is aprox 508 Mb |
it is a bit more interesting than a compensation for a menu bar. Initially wlfreerdp calculates everything correctly, what makes it lose syncronization is when a cursor is moved "off the screen" in the remote window. And the same move but at the opposite side of the "remote screen" makes it syncronize again |
I guess this is a confusion between a work area size (which is smaller under weston indeed, due to the menu/application bar) and the local screen size in full-screen mode, where whole screen size should be used instead of the work area, since in full-screen mode we occupy whole screen not just the work area. But this is just my guess.. |
May be. Too long ago, I play with wayland api. I rewrite for my own spice remote viewer. Rewrite I mean port from original gtk to wayland. And see same things if I realize incorrect input event loop and window decorations... |
I long time ago solve this via print to console x= y= mouse coord. It may help. |
The function scale_signed_coordinates did use addresses instead of values
Hi akallabeth!!! Thanks for correct some errors:) With best wishes - YD. |
$ wlfreerdp /buildconfig |
@D-Y-V well, if you tell me which one is not fixed I repoen ;) |
Thanks, and I explain some new. I connect to windows machine. All seems like ok. After 3-5-7 sec mouse without my take, self slow move to UP. After this self-moving effect, I have incorrect mouse coordinates, like video, which I posted above. May be it help... |
Anyone tried the change from @gschwind to see if this also resolves issue in weston? |
Right, I've compiled latest freerdp with the change and still having the same issue. The alpha channel is now removed but the issue persists in Weston. |
No idea where the problem is but the following seems to work:
|
@gregd72002 ok, interesting. you mind debugging which values of |
Hello @akallabeth and @gregd72002 I did the following code here to debug/understand what going on with the cursor. The code is only durty code for debug purpose and may not work for you. As you can see on the screenshot attached the patch do draw the position where the cursor is according wlfreerdp in blue. I also modify the cursor texture by drawing it's borders in green and the expected hot point in red. As you can see in my case every thing is in good shape without any positioning error. If I enable the alpha with 2x scale I get the cursor will be with half size in both direction, and the hot point in red is not any more consistent with the blue lines. |
Here it is. I've added this line just before the return:
The function is triggered only in certain situations. I could not make quite sense when exactly. But I did not spend much time on it either. It felt like it is triggered when the cursor leaves/reenters the screen or passes certain screen windows. Also something I noticed earlier, when I was experiencing the problems with the cursor position, when I clicked left mouse button and kept it pressed in, I could move the cursor freely and the mouse cursor position was all the time in sync.
|
@gschwind could you clarify which |
@akallabeth It's on the gnome side, the desktop use scale 200%, thus the window above is created with /w:800 /h:600 and appear on screen as 1600x1200 as within the screen shot. That why I filled a bug to gnome-shell/mutter. wlfreerdp always work as if the window is 800x600 as expected. |
Also note that in my case, wlfreerdp always use the cursor provided by the server and never use the default local cursor. |
I did more screenshot and first I trigger the issue you get (the one not related to alpha) as in the following screen shot, where the server side highlight the close button and the cursor is outside the window. This apply for other buttons, the cursor is quite far away from button while button appear highlighted, |
I have issue with screen shot that fix the alpha issue. What I get with screenshot: And what I see taken with my phone: We can see here that on screen the cursor is not scaled properly, and scale it twice should fix the issue. We can also see that blue line are 2 pixels large as expected, but the cursor red lines are 1 pixel large. |
@gschwind thanks, that helps. so, you only set gnome scaling, and no |
@akallabeth The scale is perfomed by the compositor. wlfreerdp is not aware of the scale directly, I use the following command: |
Also note that in my case the sever side is the xrdp server. I think the server is using freerdp. |
@gschwind ok, so this confirms the issue is not in freerdp. |
it sounds like there are 2 different bugs in here. I'm not using Gnome nor any scaling whatsoever and had the issue that the local cursor position was not in sync with the remote cursor |
Hello, I suspect this line : FreeRDP/uwac/libuwac/uwac-input.c Line 137 in 8760cec
to be the guilty, but under gnome the offset here (-x, -y) is ignored, if I change it to 0,0 it does not change anything, but according to the spec:
Thus as far as understand offset should be zero in our case. |
@gschwind no, the mouse pointer has an image that is not necessarily aligned to its upper left corner. The hotspot |
@akallabeth I know but if you read the full spec the positioning of the cursor, the position of the texture is relative to his hot-point [1] and you do not need to attach it with an offset. Maybe for older version it was necessary, but know the spec require a different setting. And if it required by an older spec, maybe we need a fix that take care of protocol versions. The related text within the specification:
[1] https://wayland.app/protocols/wayland#wl_pointer:request:set_cursor |
https://gitlab.freedesktop.org/wayland/weston/-/commits/10.0.3/ - commits in 10.0.3 in weston addresses this very issue. With 10.0.3, or current 11.0.[01], the mouse cursor position in wlfreerdp is now stable. But there, wlfreerdp has a new set of issues - eg, big mishandling of (offscreen?) bitmaps, huge flickering of everything during plain mouse move, and many others.. |
@MichaelJTokarev the flickering is another issue, but if the mouse is working now it might be time to start fixing the other issues in wlfreerdp as well :) |
We discussed this on the weston IRC channel earlier today, and I'll recap the findings here so they're not lost. Part of the problem has been fixed, the incorrect attach parameters. What's left is because the freerdp client is using incorrect serials in the wl_pointer_set_cursor() call. As stated in the wayland protocol documentation at https://gitlab.freedesktop.org/wayland/wayland/-/blob/master/protocol/wayland.xml#L1909 wl_pointer_set_cursor() should be passed the serial of the enter event. However, uwac-input.c updates the serial number on many other events (touch, keystroke, click). So when any of these events occur, the serial number will be broken until the next time the pointer leaves and reenters the window, so updating the cursor won't work correctly until that occurs. I think the fix is just removing all the |
I run wlfreerdp in Wayland>weston environment.
wlfreerdp /v /u /p /f /network:auto /gfx:avc444
When I open a folder, run a program, or minimize a window, The actual position of the mouse is about a certain distance below and to the right of the pointer, which makes it impossible to use the mouse accurately. When I move the mouse to the corner, the offset will disappear. I repeat the above to open the file and the problem will occur again.
Changed the system release version and freerdp version, and also used the night build version. The problem remains
The text was updated successfully, but these errors were encountered: