stop compressing enter/leave events.. this might be responsible for the focu sfuckups?
This commit is contained in:
parent
0147a61f89
commit
bcc9f6812b
1 changed files with 7 additions and 5 deletions
|
@ -45,8 +45,8 @@ void OtkEventDispatcher::dispatchEvents(void)
|
||||||
{
|
{
|
||||||
XEvent e;
|
XEvent e;
|
||||||
Window focus = None, unfocus = None;
|
Window focus = None, unfocus = None;
|
||||||
Window enter = None, leave = None;
|
/* Window enter = None, leave = None;
|
||||||
Window enter_root = None, leave_root = None;
|
Window enter_root = None, leave_root = None;*/
|
||||||
|
|
||||||
while (XPending(OBDisplay::display)) {
|
while (XPending(OBDisplay::display)) {
|
||||||
XNextEvent(OBDisplay::display, &e);
|
XNextEvent(OBDisplay::display, &e);
|
||||||
|
@ -112,7 +112,8 @@ void OtkEventDispatcher::dispatchEvents(void)
|
||||||
unfocus = e.xfocus.window;
|
unfocus = e.xfocus.window;
|
||||||
focus = None;
|
focus = None;
|
||||||
//printf("FocusOut focus=%lx unfocus=%lx\n", focus, unfocus);
|
//printf("FocusOut focus=%lx unfocus=%lx\n", focus, unfocus);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
// madly compress all crossing events
|
// madly compress all crossing events
|
||||||
} else if (e.type == EnterNotify) {
|
} else if (e.type == EnterNotify) {
|
||||||
// any other types are not ones we're interested in
|
// any other types are not ones we're interested in
|
||||||
|
@ -129,6 +130,7 @@ void OtkEventDispatcher::dispatchEvents(void)
|
||||||
leave_root = e.xcrossing.root;
|
leave_root = e.xcrossing.root;
|
||||||
//printf("Leave enter=%lx leave=%lx\n", enter, leave);
|
//printf("Leave enter=%lx leave=%lx\n", enter, leave);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
// normal events
|
// normal events
|
||||||
dispatch(win, e);
|
dispatch(win, e);
|
||||||
|
@ -160,7 +162,7 @@ void OtkEventDispatcher::dispatchEvents(void)
|
||||||
|
|
||||||
_focus = focus;
|
_focus = focus;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (leave != None) {
|
if (leave != None) {
|
||||||
_crossing_e.xcrossing.type = LeaveNotify;
|
_crossing_e.xcrossing.type = LeaveNotify;
|
||||||
_crossing_e.xcrossing.window = leave;
|
_crossing_e.xcrossing.window = leave;
|
||||||
|
@ -172,7 +174,7 @@ void OtkEventDispatcher::dispatchEvents(void)
|
||||||
_crossing_e.xcrossing.window = enter;
|
_crossing_e.xcrossing.window = enter;
|
||||||
_crossing_e.xcrossing.root = enter_root;
|
_crossing_e.xcrossing.root = enter_root;
|
||||||
dispatch(_crossing_e.xcrossing.window, _crossing_e);
|
dispatch(_crossing_e.xcrossing.window, _crossing_e);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void OtkEventDispatcher::dispatch(Window win, const XEvent &e) {
|
void OtkEventDispatcher::dispatch(Window win, const XEvent &e) {
|
||||||
|
|
Loading…
Reference in a new issue