Bug 2501 - Xutil.h should not include region.h
Summary: Xutil.h should not include region.h
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Adam Jackson
QA Contact:
Depends on:
Reported: 2005-02-08 12:04 UTC by Owen Taylor
Modified: 2011-10-15 17:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Owen Taylor 2005-02-08 12:04:23 UTC
region.h makes a lot of unnamespaced defines... pulling it
in in Xutil.h breaks the GTK+ build and probably will cause
problems for many other pieces of code as well.

(GTK+ is especially badly affected because it includes
a modified version of region.h and the region code internally
for 32-bit coordinates.)

Keith suggests just leaving things as-they-were and making
apps include Xutil.h before region.h. The other alternative
would be to include Xutil.h from region.h, which is presumably
safer. But the possibility for sanity in the Xlib headers 
at this point is small.
Comment 1 Owen Taylor 2005-02-08 12:33:37 UTC
Went ahead and fixed it... on second glance, it was clear that
the deletion of the Region typedef from Xutil.h was just an
accidental mismerge rather than anything intentional.

2005-02-08  Owen Taylor  <otaylor@redhat.com>

        * include/X11/Xutil.h: Really restore the
        region typedef.

2005-02-08  Owen Taylor  <otaylor@redhat.com>

        * include/X11/region.h include/X11/Xuti.h: Move
        the Region typedef back where it belong, don't include
        region.h from Xutil.h ... it defines all sorts of
        stuff (TRUE/FALSE/MIN/MAXSHORT/Box...) that will
        break compilation of projects using Xutil.h. (#2501)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.