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

No longer shows fullscreen Microsoft Remote Desktop windows #335

Closed
alt-tab-macos-bot opened this issue May 11, 2020 · 22 comments
Closed

No longer shows fullscreen Microsoft Remote Desktop windows #335

alt-tab-macos-bot opened this issue May 11, 2020 · 22 comments
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue

Comments

@alt-tab-macos-bot
Copy link

This issue was opened by a bot after a user submitted feedback through the in-app form.

Message:

AltTab is no longer showing full-screen Microsoft Remote Desktop windows. It's not an issue with full-screen apps in general; seems fairly specific to MRD.

I think that this used to work under AT, though I only use MRD sporadically and I only adopted AT relatively recently, so it's possible that's not true.

Running MRD Beta 10.4.0 (1771). They may well be doing something unusual, but note that it does still work in other switcher apps (e.g. HyperSwitch).

Debug profile

  • App version: 3.22.6
  • App preferences:
    • NSWindow Frame SUUpdateAlert: 410 363 620 392 0 0 1440 877
    • NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName: 1429 1352 491 415 744 900 1920 1177
    • SUAutomaticallyUpdate: 0
    • SUEnableAutomaticChecks: 0
    • SUHasLaunchedBefore: 1
    • SULastCheckTime: 2020-05-06 08:13:56 +0000
    • SUSkippedVersion: 3.18.0
    • alignThumbnails: 1
    • arrowKeysEnabled: true
    • cancelShortcut:
    • closeWindowShortcut:
    • fadeOutAnimation: true
    • fontHeight: 10
    • hideShowAppShortcut:
    • hideSpaceNumberLabels: true
    • holdShortcut: ⌘
    • iconSize: 24
    • metaKey: ⌘ command
    • minDeminWindowShortcut:
    • mouseHoverEnabled: true
    • nextWindowShortcut: ⇥
    • preferencesVersion: 3.22.6
    • previousWindowShortcut: ⇧⇥
    • quitAppShortcut: Q
    • showHiddenWindows: true
    • showMinimizedWindows: true
    • showOnScreen: 1
    • startAtLogin: true
    • theme: 0
  • Applications: 41
  • Windows: 9
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 1, spaceIndex: 1}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 70, spaceIndex: 4}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 69, spaceIndex: 2}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 69, spaceIndex: 2}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 69, spaceIndex: 2}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 70, spaceIndex: 4}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 1, spaceIndex: 1}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 1, spaceIndex: 1}
    • {isMinimized: false, isHidden: false, isOnAllSpaces: false, spaceId: 69, spaceIndex: 2}
  • OS version: Version 10.15.4 (Build 19E266)
  • OS architecture: x86_64
  • Locale: en_GB (current)
  • Spaces: 4
  • Dark mode: Dark
  • "Displays have separate Spaces": checked
  • Hardware model: MacBookPro14,2
  • Screens: 3
    • {x: 0.0, y: 0.0, width: 1440.0, height: 900.0}
    • {x: 744.0, y: 900.0, width: 1920.0, height: 1200.0}
    • {x: -1176.0, y: 900.0, width: 1920.0, height: 1200.0}
  • CPU model: Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
  • Memory size: 8.59 GB
  • Active CPU count: 4
  • Current CPU frequency: 3.1 Ghz
  • Resource utilization:
    • CPU: 0.0%
    • Memory: 90M
    • Threads count: 8

@mparry
Copy link

mparry commented May 11, 2020

I reported this; let me know if you need any further info.

Thanks for the app BTW - it's great otherwise!

@lwouis
Copy link
Owner

lwouis commented May 12, 2020

Hey @mparry! Thank you for sharing this issue!

I was not able to reproduce unfortunately. It works correctly on my machine as you can see here:

Screen Shot 2020-05-12 at 14 35 16

Screen Shot 2020-05-12 at 14 35 00

Could you please help me reproduce? Maybe more detailed steps, screenshots? Best would be a video. There is this great free app called Loom which lets you record you screen and share a link within minutes.

@lwouis lwouis added bug Something isn't working unreproducible Need help from the author to reproduce the issue labels May 12, 2020
@lwouis lwouis changed the title [In-app feedback] No longer shows fullscreen Microsoft Remote Desktop windows May 12, 2020
@mparry
Copy link

mparry commented May 12, 2020

This is very strange. It's quite hard to pin down exactly when/why the window does or doesn't appear.

Firstly, this does only seem to be an issue if I have MRD configured to launch sessions in fullscreen. It's fine if I launch them windowed, so that's a reasonable workaround at least!

What seems to happen in the fullscreen case is that when I first start the RD session, by double-clicking on an entry in my list of remote machines in MRD, that RD session window won't show up in AT. (I wonder if you're launching yours in quite the same way, as I don't see that MRD window in your AT list in your screenshots - I think it might be called the Connection Center?) However, if I then do a sequence of something along the lines of

  • take the RD session window out of fullscreen
  • switch back and forth between it and the Connection Center window a few times

then now the RD session appears in AT! And once it appears, it remains present, even if I switch it back into fullscreen. Though if I close it and relaunch, the same process starts all over again.

I don't think it would be possible to capture or share a video, unfortunately, or certainly not via a public service like that - I am on a somewhat restricted work Mac here.

@ngocphamm
Copy link

@lwouis I think I'm having the same issue here. This is what I have, and what I'm seeing.

I noticed from the color of the Remote desktop app you tried out, I think it's the non-beta version, so maybe that's why you couldn't reproduce the issue. I know the app is beta, so maybe it's broken to the point you won't be able to support it, but if you can spend some time checking this out, it'd be really appreciated! This doesn't bother me too much for now so I'm just chipping in to let you know I also can see the issue apart from @mparry.

@ngocphamm
Copy link

Update. Restarting AltTab will show the windows... I noticed that AltTab behaves similarly for another app I use, called Caprine (for FB messenger). 🤔

@lwouis
Copy link
Owner

lwouis commented May 21, 2020

@ngocphamm @mparry I released a new version today that might fix this issue. Could you please check it out and share here if that did it for you?

@mparry
Copy link

mparry commented May 21, 2020

Unfortunately, that doesn't fix it.

I also see the same as @ngocphamm: if I restart AT then the fullscreen window now shows up. Also, in case it's a clue, one other thing I noticed while testing this is that if you start up AT with the fullscreen window in the background, it actually draws briefly in the foreground as AT starts up.

@lwouis
Copy link
Owner

lwouis commented May 21, 2020

Unfortunately, that doesn't fix it.

I also see the same as @ngocphamm: if I restart AT then the fullscreen window now shows up.

That's unfortunate. Do you also have multiple monitors, or is the issue also happening with only 1 monitor? Also do you have the same settings as @ngocphamm shared above in the screenshot?

Also, in case it's a clue, one other thing I noticed while testing this is that if you start up AT with the fullscreen window in the background, it actually draws briefly in the foreground as AT starts up.

This is a know visual artifact created by a trick we do: if you start AT and already have multiple Spaces, we bring all your windows in the current Space for a few milliseconds to tag them, then we send them back. This is the only way I found to be able to show windows of other Spaces, before the user has manually visited all their Spaces. Most people are not aware of this artifact as AT starts at login, so normally doesn't have to resort to this trick since Spaces get created afterwards by the user, and AT can keep track as they are being used.

@mparry
Copy link

mparry commented May 21, 2020

I do indeed have multiple monitors: the MacBook Pro display plus two external monitors. Note that the behaviour is the same even if I open a fullscreen RD session on the built-in MBP display.

My RD settings (for the server I just tested with) are not the same actually:

image

@lwouis
Copy link
Owner

lwouis commented May 21, 2020

I was finally able to reproduce the issue!

The fullscreen window from MRD is considered a tabbed-window by AltTab. This tabbed-window detection was recently added to detect tabs such as Finder/Terminal tabs. Basically when you ask an app for its windows, you get only the visible windows. Let's say the Finder has 1 window open with 2 tabs. You will get only the visible tab. The other window is no longer given to you after it's merge as a tab on the other window.

The issue is that if a window spawns in fullscreen as MRD does, there was incorrect detection that it's a tab. I added a check so that fullscreen windows can not be considered tabs. I also took the opportunity to flag fullscreen windows in the code, and add a preference to show them or not, and a new indicator for fullscreen windows.

@lwouis lwouis closed this as completed in 2674c8f May 21, 2020
lwouis pushed a commit that referenced this issue May 21, 2020
# [3.24.0](v3.23.2...v3.24.0) (2020-05-21)

### Bug Fixes

* don't freeze when invoked while unity is recompiling (closes [#342](#342)) ([41cb701](41cb701)), closes [#292](#292) [#200](#200)
* don't freeze when sending a command to an frozen window ([408b800](408b800))
* show windows which are opened in fullscreen (closes [#335](#335)) ([2674c8f](2674c8f))

### Features

* show indicator for fullscreen windows ([0138cd1](0138cd1))
@mparry
Copy link

mparry commented May 21, 2020

Thanks for this; 3.24.0 works nicely

@ngocphamm
Copy link

Yep looks like it's working just fine now. Thank you, @lwouis!

@nathanshelly
Copy link

👋 first off thanks so much for this app! love having Windows alt-tab behavior on macOS

I think I'm seeing a similar bug even on the latest v4.0 (happy to open a separate issue if you'd prefer). For some reason if I fullscreen a video in Firefox the window no longer shows up in the switcher.

Here's a video showing this behavior - https://photos.app.goo.gl/NujoYwHvbBz4pAuL9

Couple potentially interesting things to note:

  • weirdly if I fullscreen the window before fullscreening the video everything works correctly (demonstrated at the end of the linked video)
  • this occurs only in Firefox, have tested Chrome, Edge & Safari without the same results
  • doesn't seem to be Youtube specific as I have reproed on Vimeo as well

thanks in advance for any help you can give and all the amazing work you've put into this app!

@sashaweiss
Copy link

Came here looking to say thank you for the MRD fix - I noticed the bug recently, but it was fixed before I even reported it! Love the app, and appreciate the quick fix.

Interestingly, was also able to repro the issue @nathanshelly posted (full disclosure - we know each other and he asked me to try and repro) - happy to help debug if that'd be useful.

@lwouis
Copy link
Owner

lwouis commented May 28, 2020

Hi @nathanshelly and @sashaweiss! Thanks for sharing this issue!

I could reproduce the issue in Firefox. I will open a new issue for this, as I believe the root cause is completely different from this ticket here. This ticket here was about a complex interaction where a window is spawned already in fullscreen, and we would detect it as a tab, due to the hacky way we have to detect tabs (no API exist to do it cleanly). Here this Firefox issue seems to be Firefox using some custom view to display fullscreen video, instead of using macOS built-in fullscreen APIs. For instance, moving the mouse cursor to the top of the screen doesn't bring the normal fullscreen title bar, and also invoking Expose reveals that they are not fullscreening, as normal fullscreen on macOS uses a dedicated Space.

Interestingly, when you fullscreen Firefox using the top left button, it does native fullscreening. Then when you double-click a video, it shows the fullscreen window within the fullscreen'ed window, which normal native behavior.

I'll see what can be done, but off the bat there is a chance that nothing can be done as we use the Accessibility API to understand what windows are shown to the user. If an app draws hacky custom views instead of using macOS windows (AppKit's NSWindow or NSPanel), then these windows are not reported by the Accessibility API and they basically don't exist as far as AltTab (but also potentially other accessibility software, like a screen reader) is concerned.

@lwouis
Copy link
Owner

lwouis commented Jul 12, 2020

Re-opening, as @mparry reported that this issue is back in recent builds. I'm surprised by this since I can't reproduce it locally, whereas I could reproduce it locally the first time, when I fixed it.

It would be great if anyone else could try to see if the issue happens with 4.2.0.

@lwouis lwouis reopened this Jul 12, 2020
@sashaweiss
Copy link

I actually just noticed this yesterday, but it seemed intermittent. I'll see if I can collect some more information and/or get a consistent repro during the upcoming week (when I'll be remoting into a machine).

@mparry
Copy link

mparry commented Jul 14, 2020

It also seems inconsistent to me, for MS Remote Desktop. Sometimes it will show sessions that are launched in fullscreen, sometimes it won't.

(I do find that it consistently doesn't show Citrix session windows, even if I take them in and out of fullscreen, but that's quite probably a separate issue. I just mentioned it over on the other issue because I happened to also have a Citrix session running at the time, at the same time as some MRD ones.)

Just looking at the change in #383 (i.e. a8b2bd9) that I was suggesting broke this - did you intentionally remove the check on the isFullscreen flag when updating the tabbed-ness of a window?

@lwouis
Copy link
Owner

lwouis commented Jul 14, 2020

did you intentionally remove the check on the isFullscreen flag when updating the tabbed-ness of a window?

Yes it was intentional. It is incorrect to say that a fullscreen window is not tabbed, as you can have tabs on a fullscreen window. It's a scenario that was brought to my attention in the other ticket, and thus why i removed this heuristic in favor of (I thought) a more general one.

I can't test Citrix scenarios unless one of you guys send me a server address to reproduce with. For MRD i can play with it locally but it doesn't reproduce the issue unfortunately

@mparry
Copy link

mparry commented Jul 15, 2020

I think that the remaining MRD problem only occurs if AltTab is started when there are already fullscreen MRD sessions open. This is probably how I reproduced it in the first place - i.e. it was restarted after installing the 4.1.6 update. I don't know if this is actually a new problem or if I just never noticed this aspect previously. Obviously, it's a pretty minor issue, compared to the previous problems with MRD.

Would it be likely to be helpful if I submitted a fresh 'debug profile' in a new ticket for the Citrix problem? I think that's about the best I can do right now; there's certainly nothing I could offer for you to debug against. (It might, incidentally, be useful if I could capture this information without opening a fresh ticket - i.e. so that I could manually paste it into one instead.)

@lwouis
Copy link
Owner

lwouis commented Jul 15, 2020

@mparry oh that's a very different scenario then. It goes into very different code paths. Initial boot is a hackfest where we teleport windows in the current Space for example to grab their info. Latet when the app is running we subscrive to running apps events, so we get clear clean info about windows being open and close from official APIs.

I'll try to reproduce now that i know it's an issue only when AltTab is started on an existing environment. It makes it a less important issue as i think most users have AltTab start on login automatically.

Note that after you restart AltTab, not seeing MRD is only one of the issue. Another issue is that you lose the correct window chronology. AltTab has no way to know the recency at which you interacted with the open windows. There is simply no way to know. We do an heuristic though, and assume that the z-order (how the windows stack on too of each other) is the chronological order. It's often close to true, but especially with multi-Spaces it can be wrong, so here is another issue at launch time that's just a sad reality but for which there is simply no way to do it better available.

Let's hope i can reproduce and let's hope there is a way to workaround macOS lack of APIs. A fullscreen window is technically on its own space, so there is no public API to access it from AltTab, thus why we do private APIs hacks to teleport the windows and such

@lwouis
Copy link
Owner

lwouis commented Jul 16, 2020

I was able to reproduce the issue with these steps:

  • AltTab is running
  • Use MRD to connect to VirtualBox VM
  • VM opens in fullscreen. At this point, it is properly listed in AltTab
  • Close AltTab
  • Switch to another space (not the one with the fullscreen MRD session)
  • Start AltTab
  • Notice that the fullscreen MRD window is missing from AltTab

It is indeed an issue about noticing the fullscreen window if AltTab is launched after it exists, which is a new scenario, and not the one from this ticket's OP. In fact, it happens for any fullscreen window. I just tested with Youtube and it also doesn't show in AltTab if it's fullscreen'd then AltTab is launched from another Space.

I'm going to close this ticket, and open a new one to clarify the scope of the issue, which is not related to MRD in particular, and the OP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests

6 participants