If the event status of a key event is captured by a widget, the libcosmic tab subscription will ignore it, but we can manually capture it in cosmic-files for its dialogs and handle it ourselves. Alternatively, the subscription could capture events regardless of status, and include it as an argument to on_escape.
Closes: pop-os/cosmic-edit#350
Escape unfocusses the main text input widget instead of closing the
dialog. The user has to hit escape twice to close the window. It's not a
big deal, but it's also unexpected and unergonomic.
Since we already depend on `rustc-hash` transiently, this doesn't add
any more dependencies. As long as DOS attacks aren't a concern (which I
don't think they are?), this should be free performance.
In my (admittedly naive) testing, this really improved CPU usage in some
cases, which is pretty nice to get for free.
Since `Element` isn't `Sync` and `ArcElementWrapper` doesn't need to be
sent across threads, the overhead from using `Arc<Mutex>` isn't really
needed. Using an `Rc<RefCell>` has the same effect, but is faster and
isn't thread-safe.
In `spawn_detached()`, the spawned process isn't waited on, which makes
zombie processes. This is fixed by calling `wait()` on the `Child`.
While this isn't done in the original function taken from the `open`
crate, it is done in `Alacritty`'s implementation, which is what the
author of `open` based the function on anyway.
Calling it on every file massively slows down extraction of zip archives containing a lot of files.
Yields a ~60x time reduction for extracting a zipped folder containing 10,000 empty txt files.
From what I can find, Ark also doesn't seem to do this, and instead relies on the OS to handle it.
Updates all dependencies other than ICU.
Enables the `dbus-config` libcosmic feature to fix theming responsiveness.
Also prevents the trash and network drive layer container from touching the edge of the window.
Closes: #1157
The fix splits the "canceled" and "failed" states for OperationError. It
also preserves that state because some functions overwrote the state by
rewrapping the error.