X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b532f8c3d2cc28e1f5e841dc2faa319172adf91..a2e268df1930c645479f782ad068ecc3686cc62d:/src/gtk/cursor.cpp diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index fe6c31ea39..54bd0e23a3 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -7,11 +7,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "cursor.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/cursor.h" #include "wx/utils.h" #include "wx/app.h" @@ -252,6 +254,17 @@ wxCursor::wxCursor( const wxImage & image ) (unsigned char)(colNextMostFreq >> 8), (unsigned char)(colNextMostFreq) ); + int fg_intensity = fg.Red() + fg.Green() + fg.Blue(); + int bg_intensity = bg.Red() + bg.Green() + bg.Blue(); + + if (bg_intensity > fg_intensity) + { + //swap fg and bg + wxColour tmp = fg; + fg = bg; + bg = tmp; + } + int hotSpotX; int hotSpotY;