mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-06 20:28:13 +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 {
|
if let Some(launch_documents) = &mut self.launch_documents {
|
||||||
launch_documents.extend(paths);
|
launch_documents.extend(paths);
|
||||||
} else {
|
} else {
|
||||||
|
if let Some(window) = &self.window {
|
||||||
|
window.restore_and_focus();
|
||||||
|
}
|
||||||
self.open_files(paths);
|
self.open_files(paths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,11 @@ impl Window {
|
|||||||
self.winit_window.set_minimized(true);
|
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) {
|
pub(crate) fn toggle_maximize(&self) {
|
||||||
if self.is_fullscreen() {
|
if self.is_fullscreen() {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user