pop-os / cosmic-protocols

Addtional wayland-protocols used by the COSMIC desktop environment
30 stars 7 forks source link

client-toolkit: Add suport for cosmic-toplevel-info-v1 version 2 #35

Closed ids1024 closed 3 weeks ago

ids1024 commented 1 month ago

This keeps the API compatible, adding fields to ToplevelInfo for the foreign handle, identifier, and geometry. While also supporting version 1 if that's all the compositor exposes.

This can be tested with the toplevel-monitor example, or anything else using this protocol. Change the bind_one call from 1..=2 to 1..=1 to test it it's still working with version 1 of the protocol. In the future may want to replace this with a different API, possibly trying to support wlroots as well, but this seems like a good approach for now.