mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-21 12:11:28 +00:00
Handle close request event for main window
When receiving close request event, main window should quit program if there is no system tray available, and just like the close button was clicked. The window close request event happens when user close window by pressing alt-f4 (Gnome) or when receiving WM_DELETE_WINDOW xwindow event. Current behavior is just close the window and let the program keep running, and there is no way to quit program without system tray.
This commit is contained in:
@@ -57,6 +57,9 @@ public class MainWindowTitleController implements FxController {
|
||||
window.setX(event.getScreenX() - xOffset);
|
||||
window.setY(event.getScreenY() - yOffset);
|
||||
});
|
||||
window.setOnCloseRequest(event -> {
|
||||
close();
|
||||
});
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
||||
Reference in New Issue
Block a user