sbmpost / AutoRaise

AutoRaise (and focus) a window when hovering over it with the mouse
GNU General Public License v3.0
1.42k stars 60 forks source link

AutoRaise and Microsoft Teams #191

Closed milos-sikic-nimbus-tech closed 5 months ago

milos-sikic-nimbus-tech commented 5 months ago

Teams has this mini-window that gets displayed when the Teams meeting window loses focus.

This is how it looks like.

Hovering over it makes AutoRaise pull the meeting window of Teams up and it also flickers. I have AutoRaise to focus windows, not raise them - all other windows exhibit no issues.

What I would expect to happen is basically nothing: maybe the little window should gain focus, but I think it's always in focus because it's always on top.

Could you maybe look into that?

Thank you for your wonderful tool! I can't use macOS without it.

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

Hmm, you might be able to use the stayFocusedBundleIds parameter for that, but I wouldn't know the bundle id of the Microsoft Teams application. Another option (as you indicate the window seems to be always on top) is the use of the ignoreApps parameter. To diagnose the issue in detail, I probably need Microsoft Teams installed. Also setting up a fake call may be difficult for me to do.

milos-sikic-nimbus-tech commented 5 months ago

Alright, I tried adding com.microsoft.teams2 to stayFocusedBundleIds. I'll report back with how it works. Thanks!

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

I installed microsoft teams. Maybe if you have a meeting id for me I can join it. It will be an meeting without anyone present but it might be enough to show the window you spoke of.

milos-sikic-nimbus-tech commented 5 months ago

@sbmpost Sorry for the late reply. Can you try here?

Edit: Removed link

Just let me know when you'd like to enter so that I can let you in.

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

I have joined. If you can let me in, that would be great.

milos-sikic-nimbus-tech commented 5 months ago

@sbmpost Done

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

I have the window, seeing if I can fix the issue...

milos-sikic-nimbus-tech commented 5 months ago

Awesome, thanks!

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

Fixed, you can use the app from the dmg inside the AutoRaise 4.8 branch. This branch will be merged to master somewhere coming week.

milos-sikic-nimbus-tech commented 5 months ago

@sbmpost Thank you so much!

milos-sikic-nimbus-tech commented 5 months ago

Hey, sorry, @sbmpost, I just tried this and it acts the same as it did on 4.7 :/

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

I was afraid of that, because the window title I am filtering out is in English on my machine. Perhaps you are using a different language? To figure out what the window title is on your machine, you can stop AutoRaise, and then from a terminal go to the AutoRaise folder and run:

make CXXFLAGS="-DOLD_ACTIVATION_METHOD -DEXPERIMENTAL_FOCUS_FIRST" && ./AutoRaise -focusDelay 1 -verbose true

Now when hovering the mouse over the video popup, the terminal log should tell you its title. If you post it, I will update the code. In a future release I am planning on adding an "ignoreWindows" parameter instead of having this hard coded.

milos-sikic-nimbus-tech commented 5 months ago

Hey @sbmpost, I'm using English on my computer.

This is what I get in the terminal when I hover over the small window:

2024-03-22 10:41:49.206 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.215 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.256 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.256 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.307 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.308 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.359 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.362 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.410 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.411 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.461 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.463 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.516 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.518 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:49.563 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:49.565 AutoRaise[89505:1438949] Focus
2024-03-22 10:41:53.423 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:41:53.426 AutoRaise[89505:1438949] Focus

For reference, this is what I get when I hover over the full window:

2024-03-22 10:42:32.004 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.103 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.156 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.204 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.259 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.309 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.363 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.412 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.462 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.513 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.565 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams
2024-03-22 10:42:32.614 AutoRaise[89505:1438949] Mouse window: Test Meeting | Microsoft Teams

Edit: Additional note, I'm using the New Microsoft Teams. The bundle ID is com.microsoft.teams2.

image
sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

I have updated the master branch. We are now at AutoRaise 4.9. It implements pattern matching as the window title for Microsoft Teams seems to change depending on the meeting title. In short: it should work properly now ;-)

milos-sikic-nimbus-tech commented 5 months ago

Fixed! Thank you very much!

milos-sikic-nimbus-tech commented 5 months ago

When I went on another meeting, it stopped working again. 🥲

I give up on Teams, I'm using that workaround where you move the window just a bit out of the current desktop, so that it doesn't cause the small popup window to appear, in case anyone runs into this and has the same problem. Teams has made sucky decisions, for sure.

Thanks again for working on this, your software really rocks!

Edit: Posting another solution that worked for me.

image

@sbmpost It might be that the pattern used to identify Microsoft Teams is not correct, because it seems that the "Meeting" you use as the first word in the pattern is a word that depends on the meeting name. So a more robust pattern would be to match by @".*\\s\\| Microsoft Teams". Just leaving it out there for you if you wanna bother with it, but ignoring the app also works.

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

It might be that the pattern used to identify Microsoft Teams is not correct, because it seems that the "Meeting" you use as the first word in the pattern is a word that depends on the meeting name. So a more robust pattern would be to match by @".*\s\| Microsoft Teams"

Lets get that into master then ;-) will let you know when I have done that.

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech Fix is in master.

milos-sikic-nimbus-tech commented 5 months ago

Just wanted to confirm that this is now fixed for me. Thank you so much for looking into this, @sbmpost. Have a great day!

sbmpost commented 5 months ago

@milos-sikic-nimbus-tech

In AutoRaise 5.2, the hard coded exception for Microsoft Teams has been replaced with a parameter. This gives you the option to pass: "\s\| Microsoft Teams". You may also the UI for this.

milos-sikic-nimbus-tech commented 5 months ago

Thanks for letting me know, @sbmpost!