Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Disambiguate GPUI2 macOS class names (#3789)

Marshall Bowers7ef2ddd7a52d
diff --git a/crates/gpui2/src/platform/mac/platform.rs b/crates/gpui2/src/platform/mac/platform.rs
index f3c3b8ea5d2..2dcfb1a58d0 100644
--- a/crates/gpui2/src/platform/mac/platform.rs
+++ b/crates/gpui2/src/platform/mac/platform.rs
@@ -66,7 +66,7 @@ static mut APP_DELEGATE_CLASS: *const Class = ptr::null();
#[ctor]
unsafe fn build_classes() {
APP_CLASS = {
- let mut decl = ClassDecl::new("GPUIApplication", class!(NSApplication)).unwrap();
+ let mut decl = ClassDecl::new("GPUI2Application", class!(NSApplication)).unwrap();
decl.add_ivar::<*mut c_void>(MAC_PLATFORM_IVAR);
decl.add_method(
sel!(sendEvent:),
@@ -76,7 +76,7 @@ unsafe fn build_classes() {
};
APP_DELEGATE_CLASS = {
- let mut decl = ClassDecl::new("GPUIApplicationDelegate", class!(NSResponder)).unwrap();
+ let mut decl = ClassDecl::new("GPUI2ApplicationDelegate", class!(NSResponder)).unwrap();
decl.add_ivar::<*mut c_void>(MAC_PLATFORM_IVAR);
decl.add_method(
sel!(applicationDidFinishLaunching:),
diff --git a/crates/gpui2/src/platform/mac/window.rs b/crates/gpui2/src/platform/mac/window.rs
index 12189e198a7..de2fa42141f 100644
--- a/crates/gpui2/src/platform/mac/window.rs
+++ b/crates/gpui2/src/platform/mac/window.rs
@@ -85,10 +85,10 @@ const NSDragOperationCopy: NSDragOperation = 1;
unsafe fn build_classes() {
::util::gpui2_loaded();
- WINDOW_CLASS = build_window_class("GPUIWindow", class!(NSWindow));
- PANEL_CLASS = build_window_class("GPUIPanel", class!(NSPanel));
+ WINDOW_CLASS = build_window_class("GPUI2Window", class!(NSWindow));
+ PANEL_CLASS = build_window_class("GPUI2Panel", class!(NSPanel));
VIEW_CLASS = {
- let mut decl = ClassDecl::new("GPUIView", class!(NSView)).unwrap();
+ let mut decl = ClassDecl::new("GPUI2View", class!(NSView)).unwrap();
decl.add_ivar::<*mut c_void>(WINDOW_STATE_IVAR);
decl.add_method(sel!(dealloc), dealloc_view as extern "C" fn(&Object, Sel));