summaryrefslogtreecommitdiff
path: root/src/video/cocoa/cocoa_wnd.mm
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-02-12 01:18:36 +0100
committerMichael Lutz <michi@icosahedron.de>2021-02-13 22:21:17 +0100
commitc78e559e88a7864a0b55cb00c82b6deac27ff1da (patch)
tree9fee356bcf92a28c1a5ab2b979480ff673c3b5c8 /src/video/cocoa/cocoa_wnd.mm
parent9c8721922b13a6789c9fed971f8550bda3099f7a (diff)
downloadopenttd-c78e559e88a7864a0b55cb00c82b6deac27ff1da.tar.xz
Codechange: [OSX] Remove unused 'app active' flag.
Diffstat (limited to 'src/video/cocoa/cocoa_wnd.mm')
-rw-r--r--src/video/cocoa/cocoa_wnd.mm55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm
index 5a3de7e55..a836646b5 100644
--- a/src/video/cocoa/cocoa_wnd.mm
+++ b/src/video/cocoa/cocoa_wnd.mm
@@ -370,13 +370,6 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag driver:(VideoDriver_Cocoa *)drv
{
if (self = [ super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag ]) {
- /* Make our window subclass receive these application notifications */
- [ [ NSNotificationCenter defaultCenter ] addObserver:self
- selector:@selector(appDidHide:) name:NSApplicationDidHideNotification object:NSApp ];
-
- [ [ NSNotificationCenter defaultCenter ] addObserver:self
- selector:@selector(appDidUnhide:) name:NSApplicationDidUnhideNotification object:NSApp ];
-
self->driver = drv;
[ self setContentMinSize:NSMakeSize(64.0f, 64.0f) ];
@@ -392,17 +385,6 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
}
/**
- * Minimize the window
- */
-- (void)miniaturize:(id)sender
-{
- /* window is hidden now */
- driver->active = false;
-
- [ super miniaturize:sender ];
-}
-
-/**
* This method fires just before the window deminaturizes from the Dock.
* We'll save the current visible surface, let the window manager redraw any
* UI elements, and restore the surface. This way, no expose event
@@ -418,9 +400,6 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
/* restore visible surface */
[ self restoreCachedImage ];
-
- /* window is visible again */
- driver->active = true;
}
/**
* Define the rectangle we draw our window in
@@ -431,20 +410,6 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
driver->AllocateBackingStore();
}
-/**
- * Handle hiding of the application
- */
-- (void)appDidHide:(NSNotification*)note
-{
- driver->active = false;
-}
-/**
- * Unhide and restore display plane and re-activate driver
- */
-- (void)appDidUnhide:(NSNotification*)note
-{
- driver->active = true;
-}
@end
@@ -1122,26 +1087,6 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
return NO;
}
-/** Handle key acceptance */
-- (void)windowDidBecomeKey:(NSNotification*)aNotification
-{
- driver->active = true;
-}
-/** Resign key acceptance */
-- (void)windowDidResignKey:(NSNotification*)aNotification
-{
- driver->active = false;
-}
-/** Handle becoming main window */
-- (void)windowDidBecomeMain:(NSNotification*)aNotification
-{
- driver->active = true;
-}
-/** Resign being main window */
-- (void)windowDidResignMain:(NSNotification*)aNotification
-{
- driver->active = false;
-}
/** Window entered fullscreen mode (10.7). */
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification
{