Gtk applications on Big Sur

Can anyone comment on how GTK apps work or fail to work on macOS 11, Big Sur?

It seems to me there must be a software layer (window manager?) which is making mincemeat of my GTK-based app – reminiscent of what Ubuntu’s Unity used to do by calling LD_PRELOAD to mess with GTK programs. One clear symptom: it seems that any windows designated GTK_WINDOW_TOPLEVEL are automatically combined into one, with an alien selection bar to choose between the windows inserted… with the nasty side-effect of pushing control buttons such as Yes/No, OK/Close off the bottom of the window.

This is a GTK2 app and I’m aware that’s somewhat retro, but it works just fine on Linux, Windows 10 and macOS 10.15, Catalina. It’s just on Big Sur that it’s hopelessly messed up. At first I thought this might somehow be due to the Intel to M1 transition, but after rebuilding the app and the whole underlying library stack for arm64, the same horrible breakage is still evident.

  1. Write a simple GTK2 program which causes the above issue.

  2. Post console output when the program runs.

  3. Post screenshots of the issue.


I plan to do that. But John Ralls tells me that what I’m seeing is likely to do with the macOS built-in “tab bar”, which one is supposed to be able to turn off. If there’s a way to turn it off programatically that would probably help a lot.

Another side-effect of the tab bar disturbing the geometry of a GTK window is that clicking on a treeview line is off by one: you end up selecting the line above the one you click on.

For the record, this problem can be be solved via code to prevent macOS from adding a “tab bar” to the program’s GUI. I did so by adding a clause to the method “applicationDidFinishLaunching” in gtk-mac-integration-3.0.0,
file GtkApplicationDelegate.c:

[NSWindow setAllowsAutomaticWindowTabbing: NO];