mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #1672] Focus remains on last app used when switching machines, still responsive! #1235
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#1235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @emacstheviking on GitHub (May 13, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1672
What happened?
I was watching a film in Firefox from Amazon Prime on an iMac running as server. When I then moved across to the Mac mini, I noticed every time I moved the mouse, the overlays showing the video rewind/forward buttons and cast information kept on appearing.
I tried again with Microsoft Teams, I gave Teams the focus, then switched back the Mac mini, again, despite the mouse being on a different machine, the parts of the Teams application that would respond to a mouse over event kept operating e.g. the icons appearing or menus flickering.
It seems that even though the mouse is not visible, it is still feeding events into the 'other' systems event loop and being processed by the last application that had focus.
The fix would seem to be to explicitly remove the focus from the active app on the machine that is 'losing input focus'. I verified this by manually clicking the desktop on the iMac running Amazon player / Teams and then moving to the other machine. This time there was no unexpected activity. It means that you can't watch anything fullscreen because as soon as you move the mouse on the 'other' machine, it causes the player app to show the usually hidden controls. Irritating!
However, Barrier is a FANTASTIC application, I've Synergy many years ago too. I am a software developer myself and I will download the code and have a look to see if anything jumps out at me in terms of a solution, and maybe a PR will follow but I am no expert on Qt, and my fix might only work for Apple platforms.
Thanks again.
Version
From Git HEAD or commit (specify below)
Git commit hash (if applicable)
No response
If applicable, where did you install Barrier from?
The server is running on a late 2012 intel iMac:
The M1 version was provided by 'Jason',
What OSes are you seeing the problem on? (Check all that apply)
macOS
What OS versions are you using?
The server machine is a late 2012 intel iMac, running Catalina, 10.15.7
The client machine, a Mac mini, is running Monterey, 12.3.1
Relevant log output
No response
Any other information
No response
@emacstheviking commented on GitHub (May 13, 2022):
I did a little digging, I figured that hiding the cursor would be the start of the trail, then that led me to:
FILE:
src/lib/platform/OSXScreen.mm, line 858I am not sure what the core graphics call would be to 'remove focus from any particular window' or maybe you'd have to create a dummy offscreen window and give that the focus, I don't know. I guess you would also have to record which window handle had the focus, if any (desktop), and then restore that on OSXScreen::enter() as well.
If I can get it to build, and if I can get the time, I'll have a go but I am up to my neck in side-things, but aren't we all!
All the best, thanks for Barrier, it's an absolute life saver.