Repository: wezterm/wezterm (language: rust)

Issue:
WezTerm doesn't start in Plasma 6 
### What Operating System(s) are you seeing this problem on?

Linux Wayland

### Which Wayland compositor or X11 Window manager(s) are you using?

KWin 5.27.80 (upcoming Plasma 6)

### WezTerm version

20230713-174400-115e629e

### Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

### Describe the bug

WezTerm fails to start with the following error:

```
interface 'wl_surface' has no event 2
01:15:04.275  ERROR  wezterm_gui > running message loop: error during event_q.dispatch protocol_error=None: Resource temporarily unavailable (os error 11); terminating
```

### To Reproduce

_No response_

### Configuration

no config

### Expected Behavior

_No response_

### Logs

_No response_

### Anything else?

This is probably an issue in smithay-client-toolkit v0.16, because its examples fail with the same error in Plasma 6. Those examples in v0.17 work just fine.


Discussion / hints:
I'd believe that upgrading will resolve this.

I've spent some time looking at updating this dependency; the changes are significant (and positive), but migrating to sctk 0.17 is effectively a rewrite of wayland support in wezterm and I don't currently have the time for this.

Can reproduce the exact same error when running under Sway.
See https://github.com/djpohly/dwl/issues/467#issuecomment-1684675968
Hi @wez, I am experiencing various issues with a number of Rust apps with SCTK <=0.17. I asked about this in  `#sway` and one of the SCTK devs opened this:

* https://github.com/Smithay/client-toolkit/pull/406

I tested this by cloning `wezterm` and running `cargo update -p smithay-client-toolkit`.

**I can confirm that `wezterm` is now working again under Sway tip.**

I think this means that you could unblock some Wayland users now without needing to fully move to `smithay-client-toolkit@0.17`. If I'm not mistaken, this will resolve this particular issue.

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index bde88ce186f..015de6841f2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4843,9 +4843,9 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043"
 
 [[package]]
 name = "smithay-client-toolkit"
-version = "0.16.0"
+version = "0.16.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454"
+checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9"
 dependencies = [
  "bitflags 1.3.2",
  "dlib",
diff --git a/window/Cargo.toml b/window/Cargo.toml
index c1243b72351..6b6d9132bca 100644
--- a/window/Cargo.toml
+++ b/window/Cargo.toml
@@ -75,7 +75,7 @@ xcb = {version="1.2", features=["render", "randr", "dri2", "xkb", "xlib_xcb", "p
 xkbcommon = { version = "0.5.0", features = ["x11", "wayland"] }
 mio = {version="0.8", features=["os-ext"]}
 libc = "0.2"
-smithay-client-toolkit = {version = "0.16", default-features=false, optional=true}
+smithay-client-toolkit = {version = "0.16.1", default-features=false, optional=true}
 wayland-protocols = {version="0.29", optional=true}
 wayland-client = {version="0.29", optional=true}
 wayland-egl = {version="0.29", optional=true}


Test patch: