Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ping Pong between virtual desktops on MacOs
07-04-2022, 20:51
Post: #1
Ping Pong between virtual desktops on MacOs
Hello,

if you open a minimwatch window on one virtual desktop on MacOs (Catalina, MBP2013), keep it open and then switch to another desktop and open a 2nd window on that virtual desktop, the MacOs GUI toggeling swipes between these two desktops continuously. Probably both windows get the focus alternatingly?

E.g. About-Window here and Log-Window there. Or property-window alternatively.

To break out of this loop you best use 3 fingers swiping up to enter the desktop overview.

Regards
Gert
Find all posts by this user
Quote this message in a reply
07-04-2022, 22:42
Post: #2
RE: Ping Pong between virtual desktops on MacOs
The next update to MinimServer and MinimWatch will have some changes to fix macOS focus issues. This might help with this problem.
Find all posts by this user
Quote this message in a reply
08-04-2022, 11:07
Post: #3
RE: Ping Pong between virtual desktops on MacOs
I tried doing what you described this with the next update and the problem is still there. It is possible to stop the toggling by swiping up very gently with three fingers. This leaves one of the desktops selected without opening the desktop overview.

I don't think it wil be possible to change MinimWatch and MinimServer to prevent this toggling. Because MinimWatch and MinimServer don't have Dock icons, it isn't possible to set options for assigning them to a desktop. The Java APIs for getting windows to come to the front and receive focus when required work differently on different platforms and after a lot of experimentation I have found a solution that works on macOS (for a single desktop) as well as Windows and Linux. This solution is coming in the next update and will fix problems on macOS with some windows being hidden behind other windows when they are first opened.
Find all posts by this user
Quote this message in a reply
09-04-2022, 18:45
Post: #4
RE: Ping Pong between virtual desktops on MacOs
maybe you first can focus an already open window to switch to this desktop before opening another window?

But it is ok for me as I know to get out of this toggling loop. I only found it to be funny when it happened the first time. And I think some users might panic a little.

Gert
Find all posts by this user
Quote this message in a reply
11-04-2022, 09:51
Post: #5
RE: Ping Pong between virtual desktops on MacOs
It makes no difference whether or not the focus is on a MinimWatch window in the first desktop. This toggling happens when any MinimWatch window is open in one desktop and another MinimWatch window is opened in another desktop.

The Java API doesn't know anything about macOS desktops, so a Java application cannot control which desktop will be used for a newly opened window. Also, a Java application cannot know whether any currently open window is on the current desktop or on some other desktop.
Find all posts by this user
Quote this message in a reply
11-04-2022, 16:30
Post: #6
RE: Ping Pong between virtual desktops on MacOs
Well, I thought that MacOs automatically will switch to the desktop with the window that is asking for focus. If this is the case, the 2nd minimwatch window will open on the same desktop after this switch. But I do not know in which cases MacOs does such desktop switches and when not.
Find all posts by this user
Quote this message in a reply
11-04-2022, 17:54
Post: #7
RE: Ping Pong between virtual desktops on MacOs
In my test, I open window 1 on desktop 1. MinimWatch gives window 1 the focus. I then switch to desktop 2 and open window 2. MinimWatch gives window 2 the focus and the toggling starts.
Find all posts by this user
Quote this message in a reply
11-04-2022, 20:24
Post: #8
RE: Ping Pong between virtual desktops on MacOs
yes, this is the way I test this, too. Therefor the idea to let minimwatch focus the first window before opening the second one. Maybe MacOs will switch back to desktop 1 and minimwatch would automatically open the second window on desktop 1, too?
Find all posts by this user
Quote this message in a reply
11-04-2022, 21:24 (This post was last modified: 11-04-2022 21:25 by simoncn.)
Post: #9
RE: Ping Pong between virtual desktops on MacOs
This would not be correct because the user might intentionally focus another application's window after MinimWatch has focused window 1. In this case, MinimWatch should not override the user's action by refocusing window 1 before opening window 2.

Also, because MinimWatch is not able to detect which desktop is active, this incorrect behaviour would also affect the single-desktop case.
Find all posts by this user
Quote this message in a reply
12-04-2022, 17:54
Post: #10
RE: Ping Pong between virtual desktops on MacOs
I tried your suggestion as an experiment to see whether it would work. The sequence of events is:

1) The user opens window 1 on desktop 1
2) MinimWatch opens window 1 and gives it the focus
3) The user switches to desktop 2
4) The user opens window 2 on desktop 2
5) MinimWatch gives the last window opened (window 1) the focus
6) MinimWatch opens window 2 and gives it the focus

The goal is to make step 6 switch back to desktop 1 and open window 2 on desktop 1 with no toggling. This works if MinimWatch adds a 500ms delay between steps 5 and 6. With a 300ms delay or less, window 2 is opened on desktop 2 with toggling.

Because a Java application can't detect which desktop is selected, this means MinimWatch and MinimServer would need to add a 500ms delay before showing any window, even when there is only a single desktop. I don't think this would be a good trade-off for solving this very rare problem.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)