X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..cd318cd31b8fd9876af7ba5f4878b90f446bd0f5:/src/gtk1/cursor.cpp?ds=sidebyside diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index f23daacbb9..54bd0e23a3 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -254,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;