X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..2c4c39878247f4b7b09b79e29b90e0b718b0d296:/src/gtk/cursor.cpp diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index f23daacbb9..54bd0e23a3 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/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;