RealRTTV / nbtworkbench

A modern NBT Editor written in Rust.
Mozilla Public License 2.0
9 stars 1 forks source link

Spam click open file opens a bunch of dialogs #3

Closed tryashtar closed 3 months ago

tryashtar commented 3 months ago

There's a bit of a delay when you click the open file button. If you click it multiple times before the open file dialog pops up, then after closing the dialog, another one will appear, and so on.

In fact, even when the file dialog is open and the app looks unresponsive, you can still click the button repeatedly and queue up more popups.

RealRTTV commented 3 months ago

yeah winit is holding back on the events while the window is open, after they come through, the window seems to send all these requests

atm I think the best course of action is adding a nullify time, where once the window closes, I set a nullify time to be 500ms in the future, so all packets that come from now til then are discarded

not sure if this is a satisfactory solution tho

RealRTTV commented 3 months ago

ok i made it ignore for 50ms, should be fixed in the newest release