projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use lib64 for 64-bit builds on some kinds of linux and lib/64 on solaris
[wxWidgets.git]
/
src
/
gtk1
/
cursor.cpp
diff --git
a/src/gtk1/cursor.cpp
b/src/gtk1/cursor.cpp
index dc03ce10db83ba99f5833335f94eba5c38c18cdd..73c259eaa50505519cc9487dc931500fd6e6244f 100644
(file)
--- a/
src/gtk1/cursor.cpp
+++ b/
src/gtk1/cursor.cpp
@@
-7,11
+7,13
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "cursor.h"
#endif
#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"
#include "wx/cursor.h"
#include "wx/utils.h"
#include "wx/app.h"
@@
-252,16
+254,27
@@
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;
- if (image.HasOption(wxCUR_HOTSPOT_X))
- hotSpotX = image.GetOptionInt(wxCUR_HOTSPOT_X);
+ if (image.HasOption(wx
IMAGE_OPTION_
CUR_HOTSPOT_X))
+ hotSpotX = image.GetOptionInt(wx
IMAGE_OPTION_
CUR_HOTSPOT_X);
else
hotSpotX = 0;
else
hotSpotX = 0;
- if (image.HasOption(wxCUR_HOTSPOT_Y))
- hotSpotY = image.GetOptionInt(wxCUR_HOTSPOT_Y);
+ if (image.HasOption(wx
IMAGE_OPTION_
CUR_HOTSPOT_Y))
+ hotSpotY = image.GetOptionInt(wx
IMAGE_OPTION_
CUR_HOTSPOT_Y);
else
hotSpotY = 0;
else
hotSpotY = 0;
@@
-354,7
+367,7
@@
void wxEndBusyCursor()
gs_savedCursor = wxNullCursor;
if (wxTheApp)
gs_savedCursor = wxNullCursor;
if (wxTheApp)
- wxTheApp->
SendIdleEvents
();
+ wxTheApp->
ProcessIdle
();
}
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
}
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
@@
-370,7
+383,7
@@
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
if (wxTheApp)
wxSetCursor( wxCursor(wxCURSOR_WATCH) );
if (wxTheApp)
- wxTheApp->
SendIdleEvents
();
+ wxTheApp->
ProcessIdle
();
gdk_flush();
}
gdk_flush();
}