Open iainx opened 5 years ago
We can't really detect if the NSWindow is a GdkWindow. We can signal a warning for using EventHandlers.
One gross trick we can use, is if the NSWindow comes from specific methods (like GtkWorkarounds) or if the Gdk/Gtk namespace is imported.
If you use XamMac's c# event handlers, XamMac will replace the delegate with its own. If you had a delegate already set, you can say bye-bye to it. This is especially dangerous when doing it with Gtk windows because everything breaks.
An analyser to throw an error when people try to use these events would be very helpful at preventing hard to trace bugs. Could it be limited to people attempting to replace it if the NSWindow class is GdkQuartzWindow?