Cloudef / wlc

High-level Wayland compositor library
MIT License
330 stars 58 forks source link

output_resolution gets called before output_created #207

Open Drakulix opened 7 years ago

Drakulix commented 7 years ago

At least when running wlc with the x11-backend output_resolution_cb gets called before the output_created_cb for the new output.

This is not only highly confusing, but may cause crashes if the output_resolution_cb might depend on some userdata being initialized. For easy use of userdata pointers output_created should be the first emited callback and output_destroyed the very last. (view_created and view_destroyed alike.) This is the only exception to this unwritten rule I have encounted so far and would like to know, if this is expected.

Drakulix commented 7 years ago

Another inconvenience: output_context_destroyed might be called after output_destroyed.

Enerccio commented 7 years ago

I can confirm first bug.

Second one is correct behavior, I think?