message: Fixed issue with window restore hiding app when 'on top' setting is enabled (mac), closes closes
diff: void *ctx;
  BOOL manualMode = NO;
  +BOOL onTop = NO;
  - (void)applicationWillFinishLaunching:(NSNotification *)not
  {
  @@ -283,6 +284,16 @@ BOOL manualMode = NO;
  name:NSWorkspaceWillPowerOffNotification
  object:nil];
  + [[NSNotificationCenter defaultCenter] addObserver:self
  + selector:@selector(mainWillMinimize:)
  + name:NSWindowWillMiniaturizeNotification
  + object:nil];
  +
  + [[NSNotificationCenter defaultCenter] addObserver:self
  + selector:@selector(mainWillRestore:)
  + name:NSWindowDidDeminiaturizeNotification
  + object:nil];
  +
  if (self.scriptPath)
  {
  [self performSelectorInBackground:@selector(runScript:)
  @@ -297,6 +308,24 @@ BOOL manualMode = NO;
  // the app to stop the timer automatically.
  }
  +- (void)mainWillMinimize:(NSNotification *)aNotification
  +{
  + if (self.mainWindowController.window.level == NSFloatingWindowLevel)
  + {
  + onTop = YES;
  + [self.mainWindowController.window setLevel:NSNormalWindowLevel];
  + }
  +}
  +
  +- (void)mainWillRestore:(NSNotification *)aNotification
  +{
  + if (onTop)
  + {
  + [self.mainWindowController.window setLevel:NSFloatingWindowLevel];
  + onTop = NO;
  + }
  +}
  +
  - (void)runScript:(NSString *)scriptFile
  {
  NSString *script = [NSString stringWithContentsOfFile:scriptFile encoding:NSUTF8StringEncoding error:nil];
  @@ -622,6 +651,8 @@ BOOL manualMode = NO;
  [self.mainWindowController.window setLevel:NSNormalWindowLevel];
  }
  + onTop = cmd.settings.on_top;
  +
  if (cmd.open)
  {
  self.preferencesWindowController.originalCmd = cmd;
  