-
Notifications
You must be signed in to change notification settings - Fork 123
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
Fix crash in simple_window
example
#644
Conversation
delegate_noop!(State: wl_surface::WlSurface); | ||
delegate_noop!(State: wl_shm::WlShm); | ||
delegate_noop!(State: ignore wl_surface::WlSurface); | ||
delegate_noop!(State: ignore wl_shm::WlShm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait why are we ignoring WlShm?
I'd think that knowing what formats are supported would be effectively mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.
https://wayland.app/protocols/wayland
So I think it's perfectly valid for the example to simply assume wl_shm::Format::Argb8888
is available.
I'm still seeing a crash here, even with adding
|
Ah, I see the problem. It is // Ignore events from these object types in this example.
delegate_noop!(State: wl_compositor::WlCompositor);
delegate_noop!(State: wl_surface::WlSurface);
delegate_noop!(State: ignore wl_shm::WlShm);
delegate_noop!(State: wl_shm_pool::WlShmPool);
delegate_noop!(State: ignore wl_buffer::WlBuffer); I'm using a freshly updated [dependencies]
wayland-client = { version = "*" }
wayland-protocols = { version = "*", features = ["client"] }
tempfile = "*" I don't know if different environments cause different events. I'm on Arch Linux, running |
By the way, it would be simplest to |
We need to handle or ignore events from `wl_shm` and `wl_surface`, since the server does in fact produce events for those.
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #644 +/- ##
=======================================
Coverage 73.11% 73.12%
=======================================
Files 47 47
Lines 7693 7692 -1
=======================================
Hits 5625 5625
+ Misses 2068 2067 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@elinorbgr comments? |
We need to handle or ignore events from
wl_shm
andwl_surface
, since the server does in fact produce events for those.