1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 // The header <X11/X.h> defines "None" as a macro that expands to "0L".
8 // This is terrible because many enumerations have an enumerator named "None".
9 // To work around this, we undefine the macro "None", and define a replacement
10 // macro named "X11None".
11 // Include this header after including X11 headers, where necessary.
15 // <X11/X.h> also defines "RevertToNone" as a macro that expands to "(int)None".
16 // Since we are undefining "None", that stops working. To keep it working,
17 // we undefine "RevertToNone" and redefine it in terms of "X11None".
20 # define RevertToNone (int)X11None
24 // X11 also defines Always, which conflicts with some style system enum variant
25 // names, so get rid of that too, given we don't use it anywhere else.
37 # define X11CurrentTime 0L
40 // X11/Xlib.h also defines True and False, get rid of those too for
41 // the same reasons as above...