Looking for a program to tweak window management on Mac OS...

ryan42

macrumors 6502
Original poster
Dec 3, 2003
297
0
Near Houston, TX
Hello all,

I have been using a piece of software since the System 7 days called DragThing which will no longer be supported on future versions of OS X. The one irreplaceable function of this app for me is that under OS X, it has a setting that makes it so that clicking on any app's windows brings all of that app's windows to the front (like classic Mac OS).

Does anyone have a recommendation of a modern program that can perform this function? All I need is something that can fire the Window > Bring All to Front command any time the active application changes, and that will run under modern (Catalina and beyond) Mac OS versions.
 

casperes1996

macrumors 601
Jan 26, 2014
4,347
2,199
Horsens, Denmark
Would it be sufficient to set a keyboard shortcut for Bring all To Front? That can be done in System Preferences.
Otherwise it may be possible to create an Automator Script for this.
 

ryan42

macrumors 6502
Original poster
Dec 3, 2003
297
0
Near Houston, TX
Would it be sufficient to set a keyboard shortcut for Bring all To Front?
This is a good stopgap if I don't find anything but I'd ideally like to have it be automatic.

I found a program called X-Assist that works for this but it is 32-bit so it will also cease to function in Catalina.
 

MacGizmo

macrumors 65816
Apr 27, 2003
1,467
801
Arizona
Using Command + Tab to switch between applications does this automatically.
Clicking on the icon in the Dock to switch between applications does this automatically.

These apps will allow you to do this when clicking on windows (instead of Command + Tabbing to the app):
SuperTab - $10, 30-day demo available - simple to use
Keyboard Maestro - $36, 30-day demo available - more complicated to set up, but is extremely powerful

There are probably other apps out there, but you can google just as easily as I can. ;)
 
Last edited:
  • Like
Reactions: chabig

Gregg2

macrumors 603
May 22, 2008
5,891
371
Milwaukee, WI
The requested functionality has been built into OSX for several versions. (back to Leopard, at least) I'm trying to remember (not at my Mac)… It was part of Spaces(?) no, um, Expose (!) that's it (I can't do the accent mark on the e). You can set an F-key to do it. It might be hiding in Mission Control now.
 

ryan42

macrumors 6502
Original poster
Dec 3, 2003
297
0
Near Houston, TX
These apps will allow you to do this when clicking on windows (instead of Command + Tabbing to the app):
SuperTab - $10, 30-day demo available - simple to use
Keyboard Maestro - $36, 30-day demo available - more complicated to set up, but is extremely powerful
Solved! I had tried SuperTab before. I must be missing something because I can't find the option to bring all windows to front when switching, however Keyboard Maestro works! I tested a macro to "Bring application windows to Front" triggered on "Any application activates" and it functions exactly as I'd hoped.

Before I read this reply, though, I had begun to try to dig through the NSWorkspace API to solve my problem and I made something that functions. In the interest of documentation, this is what the functional code looks like, however I am decidedly not a Mac developer and this code is based on a few examples I found and only loosely understand:

Code:
class MyObserver: NSObject {
            override init() {
                super.init()
                NSWorkspace.shared.notificationCenter.addObserver(self,
                                                                  selector: #selector(bringToFront(_:)),
                                                                  name: NSWorkspace.didActivateApplicationNotification,
                                                                  object:nil)
            }
            @objc dynamic private func bringToFront(_ notification: NSNotification) {
                let app = notification.userInfo!["NSWorkspaceApplicationKey"] as! NSRunningApplication
                app.unhide()
            }
        }
It took a while to land on app.unhide as I initially thought app.activate(options: .activateAllWindows) would be the ticket, but this works, and it seems more responsive than Keyboard Maestro, bringing windows to the front with no perceptible delay versus a hundred milliseconds or so. Even so I am keeping Keyboard Maestro around as I was thrilled to see it takes care of another thing I used to use DragThing for and hadn't even started to try to replace yet. In the Mac OS 8 days I started to "tear off" the application switcher menu and put it on the left side of my screen, collapsed so that only the icons showed. I used the process dock in DragThing to approximate this in OS X as I preferred it to the Mac OS Dock (apps are always in alphabetical order and only running apps are displayed). Keyboard Maestro has an Applications Palette that out-of-the-box was almost indistinguishable from my DragThing configuration. What a score! In all my digging this program never hit my radar so thanks again for the recommendation. :)



Hm. I may be able to code you a small program to do this for you. I will return, probably on Monday
I appreciate that you would take the time to do this very much. The code I cobbled together above seems to work well, though!

Thanks to everyone who offered a recommendation. I just about have all my ducks in a row to be able to move my primary machine to a new Mac after Catalina is released from my current 2011 iMac with High Sierra.
 

casperes1996

macrumors 601
Jan 26, 2014
4,347
2,199
Horsens, Denmark
I appreciate that you would take the time to do this very much. The code I cobbled together above seems to work well, though!
Glad you got it worked out. I was gonna write something very similar anyway, with a little menu bar icon, but functionality wise the same, so good job :)
 

MacGizmo

macrumors 65816
Apr 27, 2003
1,467
801
Arizona
The requested functionality has been built into OSX for several versions. (back to Leopard, at least) I'm trying to remember (not at my Mac)… It was part of Spaces(?) no, um, Expose (!) that's it (I can't do the accent mark on the e). You can set an F-key to do it. It might be hiding in Mission Control now.
The functionality was never been built-in to Exposé (which Apple killed back in 2015) nor Mission Control (which replaced Exposé & Spaces control panels). It took me a few tries to realize what he was asking for—because it's not immediately obvious, and Mission Control does not do it. The only built-in ways to do it are the two methods I mentioned above (unless you're adventurous at writing code). And those two ways are not really optimal.

What a score! In all my digging this program never hit my radar so thanks again for the recommendation. :)
You're welcome. Keyboard Maestro is obscenely powerful. You can do a crapload of stuff with it. I've never used it on my own Macs, but I have a friend who swears by it and he's shown me a bunch of automated things he has it set up to do, and I was amazed.
 
  • Like
Reactions: casperes1996