PolyMeilex / sctk-adwaita

Adwaita-like SCTK Frame
MIT License
26 stars 19 forks source link

Update to wayland-rs 0.30 #22

Closed kchibisov closed 1 year ago

kchibisov commented 1 year ago

This should update the sctk-adwaita to the latest smithay-client-toolkit and wayland-rs.

--

While I was at it, I've decided to cleanup the implementation given that the math was messy, I'm not saying that it's much better, but at least it's more readable, be aware that I was touching only the parts related to wayland-rs udpate.

The diff might scare you, but it's mostly due to example change, the diff stat for src is the following:

 src/buttons.rs | 474 +++++++++++++++++++++++++----------------------------------------
 src/lib.rs     | 983 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------
 src/parts.rs   | 281 +++++++++++++++++++--------------------
 src/pointer.rs | 328 ++++++++++++++-------------------------------
 src/surface.rs | 154 ---------------------
 src/theme.rs   | 126 +++++++++---------
 src/title.rs   |   2 +-
 7 files changed, 894 insertions(+), 1454 deletions(-)

Which removed all the inner mutability, mostly all code duplication, and so on.

I'm not entirely sure what to add to the CHANGELOG though... I know that I've fixed constructor the for the FrameConfig (made it public), not sure if it really matters...

kchibisov commented 1 year ago

As discussed on #smithay, I think this supersedes the #21.

kchibisov commented 1 year ago

Ah, there's a bug in sctk build script, so that's why CI fails, will update my branch.

kchibisov commented 1 year ago

The SCTK patches were merged, so nothing will be changed from my side.

PolyMeilex commented 1 year ago

In general, this looks good to me, not sure how to handle lack of SCTK release tho.

kchibisov commented 1 year ago

I'll ping you once it'll be released, because it should be soon™.

kchibisov commented 1 year ago

@PolyMeilex now it should be good to go.

I've also updated the Cargo.toml to make memmap2 optional, since it's used only by ab_glyph backend.