Skip to content

Commit

Permalink
fix: do not set main window postion to center every time when reopeni…
Browse files Browse the repository at this point in the history
…ng it
  • Loading branch information
tisfeng committed Apr 30, 2024
1 parent 540a35e commit 8a36e70
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,15 @@ - (void)showMainWindowIfNeeded {
[NSApp setActivationPolicy:activationPolicy];

if (showFlag) {
// If the main window does not exist, create it first, and show it center.
if (!_mainWindow) {
[self.mainWindow center];
}
[self.mainWindow makeKeyAndOrderFront:nil];
[self.floatingWindowTypeArray insertObject:@(EZWindowTypeMain) atIndex:0];

[self.mainWindow center];
[self.mainWindow makeKeyAndOrderFront:nil];
// TODO: We should record main window showing position, like mini window.
// [self showFloatingWindowType:EZWindowTypeMain queryText:nil];
}
}

Expand Down

0 comments on commit 8a36e70

Please sign in to comment.