When using WebGPU front end, creating and closing windows will cause
VM:IOSurface memory leak, due to an unreleased object reference.
Also with some other trivial memory leak prevention measures.
Fixes a bunch of warnings like this:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> window/src/os/macos/window.rs:670:23
|
670 | fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
| ^^^^^ ------------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
670 | fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
| ++++
```
This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
We're not using; we only use either Metal via WebGpu (and thus
don't ever get into the egl code), or Egl via the native opengl
implementation.
So we can bail out of the loop with the swrast fallback like
we do on windows.
closes: https://github.com/wezterm/wezterm/issues/6819
* Adding an option (disabled by default) to disable the notch avoidance so you can use the full screen if your terminal config already handles the notch.
Co-authored-by: volskaya <38878482+volskaya@users.noreply.github.com>
This is a PITA. The objc crate does some stuff that spews warnings
everywhere that the sel! and msg_send! macros are used.
That crate is not currently maintained
There is a fork of the crate which resolves the spew, but we also
use the cocoa crate which pulls in the original crate
The new fork is not compatible with cargo workspace patching.
There is an alternative objc2 crate with a nicer, more type-safe
API, but the API changes to migrate are pretty huge: I just lost
a couple of hours on this and still hadn't gotten past the migrating
the NSMenu stuff over.
So, the approach here is to simply ignore the warnings in the modules
that use the objc crate.
This will need to be fixed by someone someday, but that day is not
today.
refs: https://github.com/SSheldon/rust-objc/issues/125
There are situations where transient xcb errors can be generated
in regard to copy/paste selection. One example was reported
in connection with "wl-clip-persist" in issue #6128. And another
in issue #5482.
But there's no reason for us to terminate in response, so catch
and report any selection-related errors, as per code review in
PR #6135
As per the documentation for the OutputState info method:
/// This may be none if the output has been destroyed or the
/// compositor has not sent information about the output yet.
Unwrapping its return has lead to crashes at startup, which to
the user can appear as WezTerm refusing to start.
We should watch the child window for exposure events, not the parent
window (the parent window is just a background color and we never paint
to it).
This was a regression from commit 809bcc55.
Fixes#5405.
Newer wayland protocol expects us to mmap the keymap file
descriptor (and do so with certain mmap flags).
The current code tries to handle both normal files and pipes,
but neither will work in some cases.
This updates the code to use xkbcommon's new_from_fd,
which is what the toolkit uses, and mmap's the file.
This fixes#5393, which was caused by hanging when
trying to read the file as if it was a pipe.
We can't hope to keep the renderer's idea of the window size consistent
with the actual window size when the user can asynchronously change its
size at any moment. Therefore, we create a child window which we render
to and which we synchronously resize in response to async resizes. Since
by default the contents of X11 windows are undefined on resize, we take
the additional steps of setting our windows' X11 background color and
bit gravity as appropriate.
- was dropped with wayland reimplementation (#4777, 3eaba4e3d6)
- get appearance from xdg desktop portal
- advise all windows of appearance changes to reload config