mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Un-minimize and focus the window when a document is opened
This commit is contained in:
@@ -481,6 +481,9 @@ impl App {
|
||||
if let Some(launch_documents) = &mut self.launch_documents {
|
||||
launch_documents.extend(paths);
|
||||
} else {
|
||||
if let Some(window) = &self.window {
|
||||
window.restore_and_focus();
|
||||
}
|
||||
self.open_files(paths);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,11 @@ impl Window {
|
||||
self.winit_window.set_minimized(true);
|
||||
}
|
||||
|
||||
pub(crate) fn restore_and_focus(&self) {
|
||||
self.winit_window.set_minimized(false);
|
||||
self.winit_window.focus_window();
|
||||
}
|
||||
|
||||
pub(crate) fn toggle_maximize(&self) {
|
||||
if self.is_fullscreen() {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user