engine icon indicating copy to clipboard operation
engine copied to clipboard

Switch to GTK4

Open robert-ancell opened this issue 1 year ago • 2 comments

Migrate from GTK3 to GTK4.

Work in progress, the following still needs fixing:

What's different from GTK3:

  • No numlock support (not in GTK4)
  • Unable to pass unhandled keyboard events to other GTK widgets (not available in GTK4)

https://github.com/flutter/flutter/issues/94804

robert-ancell avatar Feb 26 '24 04:02 robert-ancell

I'm currently building this branch without an updated sysroot by using my local headers (Ubuntu 23.10):

ln -s /usr/include/vulkan/ ../build/linux/debian_sid_amd64-sysroot/usr/include/vulkan
ln -s /usr/include/vk_video/ ../build/linux/debian_sid_amd64-sysroot/usr/include/vk_video
rm -r ../build/linux/debian_sid_amd64-sysroot/usr/include/gtk-4.0/
ln -s /usr/include/gtk-4.0 ../build/linux/debian_sid_amd64-sysroot/usr/include/gtk-4.0
ln -fs /usr/lib/x86_64-linux-gnu/libgtk-4.so ../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/libgtk-4.so

robert-ancell avatar Feb 26 '24 04:02 robert-ancell

The method I've been working on for exposing the accessibility information doesn't seem possible using the current GTK4 API - https://gitlab.gnome.org/GNOME/gtk/-/issues/6495. I'm going to investigate if this can be done using another method. If GTK does allow this, then it will only be in a new release of GTK4, which may make the Flutter changes difficult to distribute.

robert-ancell avatar Mar 01 '24 01:03 robert-ancell

I'll close this as it's not likely to be completed soon, instead https://github.com/flutter/engine/pull/53369 is the first step that needs to land.

robert-ancell avatar Aug 13 '24 22:08 robert-ancell