another X11 fix for PR 8547

svn: r5710
This commit is contained in:
Matthew Flatt 2007-02-28 12:01:04 +00:00
parent 533471b4cb
commit 1a43eb5a89

View File

@ -154,6 +154,7 @@ static Window GetEventWindow(XEvent *e)
static unsigned long lastUngrabTime; static unsigned long lastUngrabTime;
static unsigned long lastUnhideTime; static unsigned long lastUnhideTime;
static int need_unhide = 0;
class Check_Ungrab_Record { class Check_Ungrab_Record {
public: public:
@ -201,7 +202,7 @@ static Bool CheckPred(Display *display, XEvent *e, char *args)
case MotionNotify: case MotionNotify:
if (e->xbutton.time > lastUnhideTime) { if (e->xbutton.time > lastUnhideTime) {
lastUnhideTime = e->xbutton.time; lastUnhideTime = e->xbutton.time;
wxUnhideAllCursors(); need_unhide = 1;
} }
break; break;
default: default:
@ -386,6 +387,11 @@ int MrEdGetNextEvent(int check_only, int current_only,
got = XCheckIfEvent(d, event, CheckPred, (char *)which); got = XCheckIfEvent(d, event, CheckPred, (char *)which);
if (need_unhide) {
need_unhide = 0;
wxUnhideAllCursors();
}
while (first_cur) { while (first_cur) {
CheckUngrab(d, first_cur); CheckUngrab(d, first_cur);
first_cur = first_cur->next; first_cur = first_cur->next;