TigerVNC / tigervnc

High performance, multi-platform VNC client and server
https://tigervnc.org
GNU General Public License v2.0
5.14k stars 942 forks source link

keyboard grab not released on secondary monitors on macOS #931

Open qijialiu opened 4 years ago

qijialiu commented 4 years ago

TigerVNC Viewer 64-bit v1.10.1 macOS Catalina version 10.15.2

I have two monitors. With VNC viewer running on one of the monitors in full-screen mode and taking system keys directly to server.

When my mouse goes to the other monitor without VNC, the mouse clip works there just instantaneously, but the focus remains at the VNC viewer, as any keyboard input will be directed into the VNC viewer.

In another thread below, a similar issue (on ubuntu but not mentioned on macOS) was resolved. But I'm still having the issue with v1.10.1. https://github.com/TigerVNC/tigervnc/issues/447

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/86341517-keyboard-grab-not-released-on-secondary-monitors-on-macos?utm_campaign=plugin&utm_content=tracker%2F3557444&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F3557444&utm_medium=issues&utm_source=github).
CendioOssman commented 4 years ago

I can reproduce this here as well. Not sure what the issue is right now.

Unfortunately #447 was a bit specific to how X11 behaves, so it's not surprising that it didn't have any effect on macOS.

CendioOssman commented 3 years ago

Hmm.. This worked fine when testing on macOS 11. Perhaps it was a OS bug rather than something in TigerVNC?

@qijialiu, are you still seeing this problem?

qijialiu commented 3 years ago

Pierre,

I'm still with 10.57. Will check about the issue after updating to 11.

Thanks for updating. It sounds good if the issue can be resolved by new macOS.

Thanks, Qijia


From: Pierre Ossman (Work account) @.> Sent: Friday, July 23, 2021 4:45 To: TigerVNC/tigervnc @.> Cc: Qijia Liu @.>; Mention @.> Subject: Re: [TigerVNC/tigervnc] keyboard grab not released on secondary monitors on macOS (#931)

Hmm.. This worked fine when testing on macOS 11. Perhaps it was a OS bug rather than something in TigerVNC?

@qijialiuhttps://github.com/qijialiu, are you still seeing this problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/TigerVNC/tigervnc/issues/931#issuecomment-885582372, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTQ7II5TP6VUIXRFDXDPDTTZFI47ANCNFSM4KCHTA6A.

CendioOssman commented 3 years ago

I tested again and I'm afraid the news aren't that fantastic. It seems to work randomly now and then, which is very odd. So something more seems to be needed.

CendioOssman commented 2 years ago

This should be fixed by 72e94ca93d3ada8fb7f518fa65644d2bc172bd4b, which is also in the new 1.12.0 release.

williamsjoblom commented 2 years ago

Despite the alleged fix in 72e94ca I can still reproduce the issue on macOS 12.0.1.

I have tried the following build variations with seemingly identical broken behavior:

So, as far as I can tell, this fix externally looks like a NOOP, so we should probably reopen this issue @CendioOssman. Worth noting is that I can only reproduce the issue with vncviewer full-screened on the primary monitor (applies to all builds above).

samhed commented 2 years ago

Seems like a macOS bug of some sorts, debug prints in FLTK show that the NSWindow isn't getting the windowDidBecomeKey or windowDidResignKey notifications when in fullscreen on the primary monitor. Those are the notifications meant to generate FLTK's focus events.