]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/cursor.cpp
removed assert which became incorrect after last change
[wxWidgets.git] / src / gtk1 / cursor.cpp
index f23daacbb9fadcdd04ec59c58b983d29506a86be..54bd0e23a3f612432b3faeaf75dfb88531ab6c0b 100644 (file)
@@ -254,6 +254,17 @@ wxCursor::wxCursor( const wxImage & image )
                              (unsigned char)(colNextMostFreq >> 8),
                              (unsigned char)(colNextMostFreq) );
 
                              (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;
 
     int hotSpotX;
     int hotSpotY;