setuid check doesn't actually check for root
There is a setuid check here: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkmain.c#L231 It only checks that Xuid's are not equal to each other. But it doesn't check for either Xuid to actually be 0. Therefore this check bans an applications that want to lower their privs (by eg setuid'ing to "nobody"), rather than to gain the root privs.