Created
September 11, 2026 20:22
-
-
Save saagarjha/cc5cf7a1082c296b2cc8308ee06f7436 to your computer and use it in GitHub Desktop.
Restore Safari titles in Exposé on macOS Golden Gate
This file contains hidden or 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
| // https://gist.github.com/saagarjha/ed701e3369639410b5d5303612964557 | |
| #import "swizzler.h" | |
| #import <AppKit/AppKit.h> | |
| #import <objc/runtime.h> | |
| static Swizzler<void, NSWindow *> BrowserWindow_updateCGSWindowTitle { | |
| NSClassFromString(@"BrowserWindow"), @selector(updateCGSWindowTitle), [](auto self) { | |
| BrowserWindow_updateCGSWindowTitle(self); | |
| auto auxiliaryStorage = object_getIvar(self, class_getInstanceVariable(self.class, "_auxiliaryStorage")); | |
| auto wmWindow = object_getIvar(auxiliaryStorage, class_getInstanceVariable([auxiliaryStorage class], "_wmWindow")); | |
| [wmWindow setTitle:self.title]; | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment