FreeRDP / FreeRDP

FreeRDP is a free remote desktop protocol library and clients

Home Page:http://www.freerdp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

freerdp 3 captures mouse events in gnome 46 Activities Overview

StrangerTwo opened this issue · comments

Describe the bug
After upgrading to gnome 46 and xfreerdp3, entering Gnome Activities Overview through top-left hot corner no longer disables mouse events within remote desktop.

Could be a Gnome 46 issue, I'm not sure

To Reproduce
Steps to reproduce the behavior:

  1. Connect to a remote desktop
  2. While in windowed mode use Gnome top-left hot corner to zoom out into Activities Overview
  3. Mouse is still active in freerdp window (visible hover effects + first mouse click registers)

Expected behavior
After entering Gnome Activities Overview, no mouse events should be registered on remote desktop

Application details

  • FreeRDP version (xfreerdp /version): FreeRDP version 3.4.0
  • Command line used: xfreerdp3 /u:*** /p:*** /w:1920 /h:1080 /v:*** /smart-sizing +auto-reconnect
  • OS version connecting to (server side): Windows 10

Environment (please complete the following information):

  • OS: EndeavourOS

I am also seeing this anomaly using Ubuntu 22.04, fully patched. I started noticing this with FreeRDP 3.3.0 official release, and now again with 3.4.0 release. I am connecting to a Windows 2022 RDS Server. It is really scary because you can accidentally apply mouse movements and keyboard commands in the other windows by mistake which can be dire. The workaround for me so far is to make sure I minimize the RDP window first before I move focus out of the window into another session or terminal. As the OP mentions, I am not sure it is a Gnome thing but I have tried to change the various Gnome tweaks to see if it had any effects but it did not. I also always use -grab-keyboard and this no longer works as it should in this situation. Please take a look.

I will also start a new issue about this but I thought I would mention it here as it may be related. Since again 3.3/3.4 releases I have been getting a lot of BadWindow (invalid Window parameter) errors and failure to connects because of it. Retrying sometimes works but usually I have to stop all other sessions and try again before success. This error reminds me of the time when there was a problem connecting to multiple sessions simultaneously through Remina.

  1. where did you get that idea from? xfreerdp is a X11 application and does not know of any gnome or kde (or other) overview
  2. if you enter the window the mouse events are sent, if you leave it the mouse events are no longer sent is the only logic there is.

please clarify if there is something that is not handled like that (mouse out of window and still redirecting events?)

  1. I guess I was blurring the line between windowing system and window manager because I was thinking that when I sometimes use -decorations or /wm-class that it may have some effect.
  2. You nailed it. That is exactly what is going on. When moving the mouse out of the window, mouse events and keyboard strokes are still being redirected back to the original session/window. Let me be more specific with an example: using Ubuntu 22.04 and Gnome, I frequently press the Super key to get an overview of all desktop sessions. I then click into the one I need to be in. After finishing up in that session and return to the previous one, I find that mouse and/or keyboard commands were sent to this session after exiting with the Super key. If for example I had the Windows File manager up at the time of exit, strange things would happen to it like some of the folders were highlighted, or a folder was changed into, etc. Clearly, the session is getting additional input upon exiting with the Super key. When in overview mode and hovering the mouse over the file manager of the original session, you can plainly see that the focus was still left in that session before clicking into another session from the overview screen. I have not noticed this in prior versions before 3.2 and never in the 2.x series.

ok, I´ve just tested here on fedora 39:
there seems to be some odd behavior if the gnome session is run in X11 mode.
In overview the mouse events are sometimes also sent to the xfreerdp window even if the mouse is slightly outside it.

it definitely did not send mouse events to the session once another window had focus.

so, unless you can give me more details I assume this issue answered.

note: I´ve used https://github.com/akallabeth/FreeRDP/tree/input_check to test, this branch adds log messages for all keyboard and mouse events.