GNOME Bugzilla – Bug 382923
libgnomeui doesn't build with non-X11 GDK backend
Last modified: 2007-07-29 14:33:40 UTC
libgnomeui doesn't build when Gtk is compiled with a non-X11 backend, because it calls an X11 function (XUngrabServer) directly. The code in libgnomeui/gnome-ui-init.c must be guarded with #ifdef GDK_WINDOWING_X11.
Created attachment 77794 [details] [review] Patch to build libgnomeui with non-X11 GDK backend
Would like to get a comment from one of the gtk+ developers on this, Matthias?
The one obvious question is: where is the corresponding XGrabServer call, and why is it not similarly treated by the patch ? Or is it already ifdefed ? Also, I assume there must be #includes that must be protected somehow, say by #ifdef HAVE_X11_H or something. Other than that, the patch looks like a step in the right direction wrt to compilining libgnomeui on non-X11. Didn't tml already do all this work, btw ? Or maybe we just regressed.
Is the reporter using GTK built for what backend and on what platform? On native Win32 (G_OS_WIN32), the whole segv handling including ungrabbing the X11 server stuff is indeed ifdeffed out. So if the reporter for instance has GTK for the frame buffer backend, the patch is needed.
The libgnomeui source doesn't contain any XGrabServer call. That's why I simply ifdefed the XUngrabServer call. I was using the Quartz GDK backend.
The XUngrabServer() call was added as a fix for bug 129930 as a suggestion from Mark.
So, does anyone have objections to this patch going in?
The patch looks fine to me.
Let's get it in on trunk then.
The segv handler has been removed on trunk, making this patch obsolete.