http://library.gnome.org/devel/gdk/2.22/gdk-X-Window-System-Interaction.html#GDK-DISPLAY:CAPS

"GDK_DISPLAY has been deprecated since version 2.22 and should not be
used in newly-written code. Use gdk_display_get_default()"

gdk_display_get_default() has been available since 2.2, which is older
than anything still around.  You should probably fix the call site
rather than doing this header tweak.

On Fri, Oct 15, 2010 at 3:13 PM, Alex Milowski <[email protected]> wrote:
> I kept getting GDK_DISPLAY related errors on my Ubuntu-based development
> machine.  It turns on in Gtk 2.22.0 that GDK_DISPLAY just isn't defined
> (at least via Ubuntu 10.10).
>
> I fixed that by a header tweak:
>
> Index: GtkVersioning.h
> ===================================================================
> --- GtkVersioning.h     (revision 69861)
> +++ GtkVersioning.h     (working copy)
> @@ -30,6 +30,10 @@
>  G_BEGIN_DECLS
>
>  // Macros to avoid deprecation checking churn
> +#if GTK_CHECK_VERSION(2, 22, 0)
> +#define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
> +#endif
> +
>  #ifndef GTK_API_VERSION_2
>  #define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
>  #else
>
>
> I'm not an expert on this so I really don't know why this is
> necessary.  With the
> above change, everything compiles and works fine.
>
> --
> --Alex Milowski
> "The excellence of grammar as a guide is proportional to the paucity of the
> inflexions, i.e. to the degree of analysis effected by the language
> considered."
>
> Bertrand Russell in a footnote of Principles of Mathematics
> _______________________________________________
> webkit-dev mailing list
> [email protected]
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to