owickstrom / gi-gtk-declarative

Declarative GTK+ programming in Haskell
https://owickstrom.github.io/gi-gtk-declarative/
284 stars 32 forks source link

CustomWidget is always modified or replaced? #103

Open wavewave opened 2 years ago

wavewave commented 2 years ago

From this code bit https://github.com/owickstrom/gi-gtk-declarative/blob/b876aab4ee8b1e1e799c5346cade687429cd5ee3/gi-gtk-declarative/src/GI/Gtk/Declarative/CustomWidget.hs#L80 CustomKeep case is never mapped to Keep in Patch, therefore it induces lots of unnecessary UI updates. I noticed this from my work. Is there any reason that it was implemented in that way? Thanks.

owickstrom commented 2 years ago

Thanks for the report! It does look like an oversight, indeed. Would you be willing to submit a PR and add the missing handling of Keep?

wavewave commented 2 years ago

Yes, I will. I haven't tried to patch this yet, but definitely I can try in my current work context. Thanks.