Created
April 29, 2020 17:49
-
-
Save connordavenport/f0fad8ed6ec0d497c5bb19688b2f0e73 to your computer and use it in GitHub Desktop.
Bring RF extension windows to the front when app becomes active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from AppKit import * | |
from mojo.events import addObserver | |
class frontAndCenter(): | |
def __init__(self): | |
addObserver(self,"bringFront", "applicationDidBecomeActive") | |
def bringFront(self,sender): | |
windows = [w for w in NSApp().orderedWindows() if w.isVisible()] | |
for win in windows: | |
if not hasattr(win,"windowName"): | |
win.makeKeyAndOrderFront_(win) | |
frontAndCenter() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment