Files
LLeMbas-TTY/window
Chris Pick cfb1e9190f Prevent infinite loop in macOS' "Service" menu validation
The `WezTermAppDelegate` class was setting `NSWindow` as its parent.

This caused an infinite loop any time macOS's "Service" menu was
expanded becuase it would pass [`validRequestorForSendType:returnType:`]
(https://developer.apple.com/documentation/appkit/nsresponder/1524638-validrequestor)
messages along the full responder chain to [check for objects that are
eligible for services offered by other applications]
(https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-148895).

The [responder chain]
(https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW9)
would walk up to the `WezTermAppDelegate` which, since it was an
`NSWindow`, would walk back to `NSApp` which would walk to its delegate
(`WezTermAppDelegate`) and so on forever.


Change `WezTermAppDelegate`s parent class `NSObject` to prevent this
loop.

Fixes: https://github.com/wezterm/wezterm/issues/6738
Fixes: https://github.com/wezterm/wezterm/issues/6833
2025-07-23 08:15:24 +01:00
..
2024-05-04 16:09:38 -07:00
2022-08-17 07:19:12 -07:00