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

Microsoft Apps (Excel and Word) Windows Raised #100

Closed
hasantahir opened this issue Aug 2, 2022 · 4 comments
Closed

Microsoft Apps (Excel and Word) Windows Raised #100

hasantahir opened this issue Aug 2, 2022 · 4 comments

Comments

@hasantahir
Copy link

A bit weird observation but multiple windows of Microsoft Excel are raised on their own when focused. I pulled the latest version of the app from the Master branch and compiled it with make CXXFLAGS="-DOLD_ACTIVATION_METHOD -DEXPERIMENTAL_FOCUS_FIRST" && make install.

This doesn't happen elsewhere (tried multiple windows of Chrome, Powerpoint, Skim PDF Reader,

Here's a video of the behaviour when I hover the cursor using a trackpad without clicking:

Excel:
https://user-images.githubusercontent.com/11236148/182356051-5e70f724-3c2b-4767-8404-bc03ca87536a.mov

Word:

Screen.Recording.2022-08-02.at.11.47.01.mov

Observed the same behaviour when running the app through the command line using the config:
./AutoRaise -delay 0 -mouseStop true -verbose true

--
PS: On macOS 12.5, there were a few deprecation warnings during the compiling

AutoRaise.mm:155:9: warning: 'SameProcess' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
        SameProcess(_window_psn, _focused_window_psn, &same_process);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:696:1: note: 'SameProcess' has been explicitly marked deprecated here
SameProcess(
^
AutoRaise.mm:186:22: warning: 'GetProcessForPID' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
    OSStatus error = GetProcessForPID(pid, &process);
                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:930:1: note: 'GetProcessForPID' has been explicitly marked deprecated here
GetProcessForPID(
^
AutoRaise.mm:187:19: warning: 'SetFrontProcessWithOptions' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
    if (!error) { SetFrontProcessWithOptions(&process, kSetFrontProcessFrontWindowOnly); }
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:658:1: note: 'SetFrontProcessWithOptions' has been explicitly marked deprecated here
SetFrontProcessWithOptions(
^
AutoRaise.mm:977:50: warning: 'GetProcessForPID' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
                                OSStatus error = GetProcessForPID(frontmost_pid, &focusedWindow_psn);
                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:930:1: note: 'GetProcessForPID' has been explicitly marked deprecated here
GetProcessForPID(
^
AutoRaise.mm:1002:50: warning: 'GetProcessForPID' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
                                OSStatus error = GetProcessForPID(mouseWindow_pid, &mouseWindow_psn);
                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:930:1: note: 'GetProcessForPID' has been explicitly marked deprecated here
GetProcessForPID(
^
5 warnings generated.

Thanks as always.

@sbmpost
Copy link
Owner

sbmpost commented Aug 2, 2022

@hasantahir
Yes this indeed happens with some faulty applications that decide to raise their windows on focus. In the past firefox had the same problem but they fixed it. Unfortunately AutoRaise can't work around these cases. The only workaround would be to exclude those applications from focusing at all, but that seems worse to me?

@hasantahir
Copy link
Author

Thanks, hoping the Microsoft folks are able to fix this on their end.

@hasantahir
Copy link
Author

hasantahir commented Aug 17, 2022

Hi @sbmpost

While using Zotero been noticing the same issue where it raises itself. Since it is based on Firefox, tried it and there is the same issue there. You mentioned that there were similar issues in the past with firefox.

Edit: tried Firefox nightly 105a and this behaviour is no longer observed.

I wanted to try out the GUI version just to exclude apps such as Zotero but I am unable to use it. The app inside the DMG doesn't seem to do anything for me.

Thanks

@sbmpost
Copy link
Owner

sbmpost commented Aug 19, 2022

@hasantahir
Can you open a new issue for the app in the dmg that doesn't seem to work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants