diff --git a/panda/src/x11display/x11GraphicsPipe.cxx b/panda/src/x11display/x11GraphicsPipe.cxx index d50fc51dd1..ab2b662fe2 100644 --- a/panda/src/x11display/x11GraphicsPipe.cxx +++ b/panda/src/x11display/x11GraphicsPipe.cxx @@ -20,12 +20,9 @@ #ifdef HAVE_XRANDR // Ugly workaround around the conflicting definition // of Connection that randr.h provides. -#define _RANDR_H_ -typedef unsigned short Connection; -typedef unsigned short Rotation; -typedef unsigned short SizeID; -typedef unsigned short SubpixelOrder; +#define Connection XConnection #include +#undef Connection #endif TypeHandle x11GraphicsPipe::_type_handle; diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 3a5b745a8d..e6bd7a15e9 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -39,12 +39,9 @@ #ifdef HAVE_XRANDR // Ugly workaround around the conflicting definition // of Connection that randr.h provides. -#define _RANDR_H_ -typedef unsigned short Connection; -typedef unsigned short Rotation; -typedef unsigned short SizeID; -typedef unsigned short SubpixelOrder; +#define Connection XConnection #include +#undef Connection #endif #ifdef HAVE_LINUX_INPUT_H