Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window closing does not work #226

Open
Neyl-123 opened this issue Nov 30, 2024 · 2 comments
Open

Window closing does not work #226

Neyl-123 opened this issue Nov 30, 2024 · 2 comments

Comments

@Neyl-123
Copy link

Neyl-123 commented Nov 30, 2024

Describe the bug
Closing the window with the "Quit" button as well as the "X" button on GNOME does not actually close the window.

Desktop:

  • OS: Fedora Linux 40 (Workstation Edition) and Windows 10
  • Version 0.6.2

Additional context
I can close the window only when I terminate the process.
Happens consistently both on Windows and Linux with GNOME (both Wayland and X11).

@Neyl-123
Copy link
Author

Neyl-123 commented Dec 2, 2024

From apps/desktop/src-tauri/src/main.rs:

  app
    .build(tauri::generate_context!())
    .expect("An error occured while running the app!")
    .run(|app, event| {
      if let tauri::RunEvent::WindowEvent {
        event: tauri::WindowEvent::CloseRequested { api, .. },
        label,
        ..
      } = event
      {
        if label == SETTINGS_WINDOW_NAME {
          let win = app.get_webview_window(label.as_str()).unwrap();
          win.hide().unwrap();
        }


        api.prevent_close();
      }
    });

When overlayed gets a Window CloseRequested why does it just flat out prevent the close?

@Neyl-123
Copy link
Author

Neyl-123 commented Dec 2, 2024

On GNOME the "App Indicators" or "Tray Icons" are not shown by default. If overlayed is in it's pinned state the user has no access to togging the pinned status or quitting the application. Quitting works with the "Quit Overlayed" button that is displayed if there is a error connecting to discord or with the "Quit" button from the Tray Icon and both are not always displayed. The proper way to handle this would probably be to add a toggle button to the GNOME Quick Settings Menu, which would need some effort. Regardless of Tray Icons vs Quick Settings the "Quit" button from the dash (the menu bar on the bottom with your pinned and open applications) and the "X" button you get from hovering over the window in the window overview should work and actually close the window. Maybe even add an "X" button to the right of the settings button just as the settings window already has one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant