Skip to content

Draft: GTK4

Alice Mikhaylenko requested to merge alicem/libhandy:gtk4 into master

Let's use this as the tracking place.


  • Make sure all new API has docs
  • A lot of API has incorrect Since:. I wonder if we should just remove all Sinces, since this is more or less a new library.
  • Need to clean up the commits
  • Some preparations can be done in GTK3, such as moving icons
  • Sync up changes from GTK4, mainly a11y additions as there've been plenty recently
    • GtkStack -> HdyLeaflet, HdySqueezer, partially HdyCarousel/HdyCarouselBox (a11y, transition fixes)
    • GtkStackSwitcher -> HdyViewSwitcher (a11y)
    • GtkDropDown -> HdyComboRow (checkmarks)


  • Clicking the row doesn't activate its child, instead it just focuses it. GTK4 has its own implementation for this, we should probably reuse it. gtk!3012 (merged)


  • The selector doesn't reset after pressing 🚮️ in the demo.


  • Split the logic into HdyClampLayout
  • Provide a scrollable variant, to be used with GtkListView


  • Dots change shape in a glitchy way unless viewed the scale is really high.
  • We have gizmos now, can we replace custom snapshot() with that?


  • Ditto, try to use real widgets


  • I removed rounding from first/last rows as we GtkPopover clips corners anyway, but it results in cut-off focus outline (which is much more visible in GTK4), we need to bring it back
  • Focus is all over the place
  • Switch to GtkListView
  • Make API more similar to GtkDropDown
  • There's a memory management error somewhere in dispose, test crashes
  • No selected item check, same as in GtkDropDown


  • hdy_expander_row_remove() should be able to remove prefixes/actions.
  • Previous sibling is always null in a GtkListView
  • Previous sibling approach is simply not viable in a list view anyway


  • Buttons aren't square
  • Input entry filtering doesn't work


  • Currently the port merges them back, the mixin was way too unwieldy to work with
  • Over and under transitions are noticeably slower on a 4K screen than slide


  • No back button


  • Window flickers when changing decoration layout on header bars. I wonder if we should try a completely different approach instead, like overlaying GtkWindowControls in HdyWindow and having headerbars only change padding. - #372


  • The view switcher can stay at the top if it's small (#341 (closed))


  • Small -> large transition is broken.


  • Cannot start a swipe from GtkScrolledWindow inside a swipeable widget, but can if it's outside. In other words, carousel/deck demo swipes work, but demo->list swipe doesn't. This needs to be fixed upstream, GtkScrolledWindow stopped propagating scroll events for directions without scrollbars. gtk!2953
    • After that's merged, we should unify event handling using capture and bubble phases the same way
  • Swipe is broken in HdyPreferencesWindow subpages
  • Can we somehow get rid of GtkButton/GtkWindowHandle special cases? - gtk!3001 (merged) should fix it for GtkButton
  • Split handle_scroll_event() to begin/update/end and inline it where appropriate, it doesn't make sense anymore
  • Since we use event controllers for everything, try to use GTK's velocity calculation instead of our own


  • Criticals on size_allocate()


  • Missing the outline
    • Outline is still there in fullscreen
Edited by Alice Mikhaylenko

Merge request reports