diff --git a/ChangeLog b/ChangeLog index 61df639..c364bda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ Version 1.1.0 * Widget::hasModalFocus has been renamed to Widget::isModalFocused. * Widget::hasModalMouseInputFocus has been renamed to Widget::isModalMouseInputFocused. * Widget::generateAction has been renamed to Widget::distributeActionEvent. +* DELETE is now undefined in Key.hpp if present. It should hopefully + take care of some problems with windows.h defining delete which + sometimes breaks Key.hpp. Version 1.0.0 ============= diff --git a/TODO b/TODO index 9a4b62f..4bfc0bc 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -* Continue rebasing from d0400d4714bcdad2d1f00283c80e77317147ea5c +* Continue rebasing from 063dc975e98dfc74c2565229ce175cccc70fa4dd * Add a focus listener interface. * Make focus apply synchronously. * Graphics and input objects for DirectX. diff --git a/include/guisan/key.hpp b/include/guisan/key.hpp index a41890e..7d04d67 100644 --- a/include/guisan/key.hpp +++ b/include/guisan/key.hpp @@ -59,6 +59,13 @@ #include "guisan/platform.hpp" +// defines DELETE which breaks this file as we have a constant named +// DELETE, hence we undefine DELETE if it is defined and hope people don't use +// that windows define with Guisan. +#if defined(_WIN32) && defined(DELETE) +# undef DELETE +#endif + namespace gcn { /** diff --git a/include/guisan/opengl/openglimage.hpp b/include/guisan/opengl/openglimage.hpp index a0cdae5..3243be8 100644 --- a/include/guisan/opengl/openglimage.hpp +++ b/include/guisan/opengl/openglimage.hpp @@ -57,12 +57,9 @@ #ifndef GCN_OPENGLIMAGE_HPP #define GCN_OPENGLIMAGE_HPP -#if defined (_WIN32) -#define WIN32_LEAN_AND_MEAN -#include -#if defined (DELETE) -#undef DELETE -#endif +#if defined(_WIN32) +# define WIN32_LEAN_AND_MEAN +# include #endif #if defined (__APPLE__)