From b4fa8e90f93e64fc3ac45e820c892ff9f3cbe870 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 16 Jan 2010 08:49:48 +0000 Subject: [PATCH] Wait, this fix is cleaner --- panda/src/x11display/x11GraphicsPipe.cxx | 7 ++----- panda/src/x11display/x11GraphicsWindow.cxx | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) 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