Skip to content
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

freerdp 3 captures mouse events in gnome 46 Activities Overview #10028

Closed
StrangerTwo opened this issue Mar 28, 2024 · 6 comments
Closed

freerdp 3 captures mouse events in gnome 46 Activities Overview #10028

StrangerTwo opened this issue Mar 28, 2024 · 6 comments

Comments

@StrangerTwo
Copy link

StrangerTwo commented Mar 28, 2024

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
@user-629782
Copy link

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.

@akallabeth
Copy link
Member

  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?)

@user-629782
Copy link

user-629782 commented Apr 1, 2024

  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.

@akallabeth
Copy link
Member

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.

@StrangerTwo
Copy link
Author

StrangerTwo commented Apr 16, 2024

@akallabeth I found out the same issue applies to Gnome Calendar/Notification popup window.

I was able to record some footage:

2024-04-16.11-03-04.mp4

The remote desktop handles both mouse movements + mouse click (I selected some text at the end of the video by double clicking)

@akallabeth
Copy link
Member

so basically a gnome feature/bug on X11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants