summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2021-02-18 13:00:43 -0800
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2021-02-18 22:32:14 -0800
commit4b4500c48f06e7ef41cd94f417e49b3f4f1412ae (patch)
tree793f1ed7602b95ee35676426f92c718a0173b110
parent39c0e1c0ab6a0a89a71f26446973c779ca7fd927 (diff)
xquartz: Fold away some unnecessary hops to X11Controller through X11Application
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/X11Application.h1
-rw-r--r--hw/xquartz/X11Application.m28
2 files changed, 4 insertions, 25 deletions
diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index 740a8070a..b10d265f9 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -42,7 +42,6 @@
}
- (void)set_controller:controller;
-- (void)set_window_menu:(NSArray *)list;
- (CFPropertyListRef)prefs_get_copy:(NSString *)key CF_RETURNS_RETAINED;
- (int)prefs_get_integer:(NSString *)key default:(int)def;
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index b1757b846..0574f908a 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -434,16 +434,6 @@ QuartzModeBundleInit(void);
}
}
-- (void) set_window_menu:(NSArray *)list
-{
- [_controller set_window_menu:list];
-}
-
-- (void) set_window_menu_check:(NSNumber *)n
-{
- [_controller set_window_menu_check:n];
-}
-
- (void) set_apps_menu:(NSArray *)list
{
[_controller set_apps_menu:list];
@@ -457,16 +447,6 @@ QuartzModeBundleInit(void);
[self activateX:YES];
}
-- (void) set_can_quit:(NSNumber *)state
-{
- [_controller set_can_quit:[state boolValue]];
-}
-
-- (void) server_ready:unused
-{
- [_controller server_ready];
-}
-
- (void) show_hide_menubar:(NSNumber *)state
{
/* Also shows/hides the dock */
@@ -922,7 +902,7 @@ X11ApplicationSetWindowMenu(int nitems, const char **items,
}
dispatch_async(dispatch_get_main_queue(), ^{
- [X11App set_window_menu:allMenuItems];
+ [X11App.controller set_window_menu:allMenuItems];
});
}
}
@@ -931,7 +911,7 @@ void
X11ApplicationSetWindowMenuCheck(int idx)
{
dispatch_async(dispatch_get_main_queue(), ^{
- [X11App set_window_menu_check:@(idx)];
+ [X11App.controller set_window_menu_check:@(idx)];
});
}
@@ -947,7 +927,7 @@ void
X11ApplicationSetCanQuit(int state)
{
dispatch_async(dispatch_get_main_queue(), ^{
- [X11App set_can_quit:@(state)];
+ [X11App.controller set_can_quit:!!state];
});
}
@@ -955,7 +935,7 @@ void
X11ApplicationServerReady(void)
{
dispatch_async(dispatch_get_main_queue(), ^{
- [X11App server_ready:nil];
+ [X11App.controller server_ready];
});
}