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

[bug] Closing windows does not emit WindowEvent::Destroyed #3688

Closed
UserVeryUnknown opened this issue Mar 12, 2022 · 5 comments
Closed

[bug] Closing windows does not emit WindowEvent::Destroyed #3688

UserVeryUnknown opened this issue Mar 12, 2022 · 5 comments

Comments

@UserVeryUnknown
Copy link

Describe the bug

In a previous version a secondary window that I created emited the WindowEvent::Destroyed event when closed. I just upgraded to 1.0.0-rc.4 and here the event seems not being emitted.

Reproduction

https://github.com/UserVeryUnknown/test-tauri-2win

The application consists of a main window with a button to open a second window. Once it is open there are 2 ways closing the 2nd window, either by the button on the 1st window or clicking the X on the 2nd window. Both do not trigger the event handler. But e.g. moving the windows does (so the event handler is working).

Expected behavior

When closing the window the WindowEvent::Destroyed should be emitted.

Platform and versions

H:\Source\Rust\test-tauri-2win>npm run tauri info

> test-tauri-2win@0.0.0 tauri
> tauri "info"


Operating System - Windows, version 10.0.19044 X64
Webview2 - 99.0.1150.36
Visual Studio Build Tools:
   - Visual Studio Community 2019

Node.js environment
  Node.js - 16.13.1
  @tauri-apps/cli - 1.0.0-rc.6 (outdated, latest: 1.0.0-rc.7)
  @tauri-apps/api - 1.0.0-rc.2

Global packages
  npm - 8.1.2
  pnpm - Not installed
  yarn - Not installed

Rust environment
  rustup - 1.24.3
  rustc - 1.59.0
  cargo - 1.59.0
  toolchain - stable-x86_64-pc-windows-msvc 

App directory structure
/.git
/.vscode
/dist
/node_modules
/public
/src
/src-tauri

App
  tauri - 1.0.0-rc.4
  tauri-build - 1.0.0-rc.4
  tao - 0.6.4
  wry - 0.13.3
  build-type - bundle
  CSP - unset
  distDir - ../dist
  devPath - http://localhost:3000/
  framework - Vue.js

Stack trace

No response

Additional context

No response

@UserVeryUnknown UserVeryUnknown changed the title [bug] Closing windows do not emit WindowEvent::Destroyed [bug] Closing windows does not emit WindowEvent::Destroyed Mar 12, 2022
@lucasfernog
Copy link
Member

First step for the fix: tauri-apps/tao#349

I'll open the Tauri PR in a bit.

@lucasfernog
Copy link
Member

Also tauri-apps/tao#350 is needed for this.

@UserVeryUnknown
Copy link
Author

UserVeryUnknown commented Mar 28, 2022

@lucasfernog : I just built against the rc5 and I still have the same issue!

@lucasfernog
Copy link
Member

My bad I just found the regression. Fixing it atm.

@lucasfernog
Copy link
Member

Fixed on rc.6

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

No branches or pull requests

2 participants