GNOME Bugzilla – Bug 734366
gcr: fix UI code to remove X11 specific dependencies
Last modified: 2021-02-16 10:36:43 UTC
The current UI code uses X11 specific function calls and relies on gdk/gdkx.h in several places. This breaks the build when gtk+ is built with other than the X11 backend. Specifically this makes it impossible to build gcr and its dependents using the gtk+ Quartz backend on Mac OS X. Requesting a rework of this code to use only backend agnositic gtk+ APIs if at all possible or at least allow building with the gtk+ Quartz backend. See also https://trac.macports.org/ticket/41839. Thanks for any help Dave Evans GNOME maintainer for MacPorts
I would certainly review and accept patches to make these dependencies conditional.
Fair enough. Will take a look at what is involved and let you know. As a starting point, is there anything in the code to your knowledge that really requires X11 specific code (i.e. can't be done otherwise)? Is it fair to utilize features that are only available in gtk 3.12+?
I think it's just places where we turn window handles/ids into strings where we currently have an X dependency. This would need to be done in a platform specific manner for each GDK backend. Bumping the gtk dependency to 3.10 or 3.12 isn't bad, if it proves to be necessary.
This also prevents wayland systems from eliminating the X11 dependency at all. Is X11 still necessary for gcr?
See above comments. Patches are welcome to make these dependencies optional, and identify non X11 windows appropriately.
This has been implemented for Wayland in the latest upstream, so there is no longer a hard X11 dependency. Given that this issue hasn't seen any progress related to Quartz, I'm closing it now. If there's still a need to get this working, feel free to make an issue on the gcr GitLab repository, or an MR with the accompanying changes.