Event handling: Don't reorder mouse handling
For performance reasons, we only handle the last motion notify we receive. However, we must make sure that the motion isn't moved after enter or leave notifies. Else, breakage is ensured! Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
82ef539513
commit
3bfcf4594e
|
@ -225,6 +225,15 @@ a_xcb_check_cb(EV_P_ ev_check *w, int revents)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
uint8_t type = XCB_EVENT_RESPONSE_TYPE(event);
|
||||||
|
if((type == XCB_ENTER_NOTIFY || type == XCB_LEAVE_NOTIFY) && mouse)
|
||||||
|
{
|
||||||
|
/* Make sure enter/motion/leave events are handled in the
|
||||||
|
* correct order */
|
||||||
|
event_handle(mouse);
|
||||||
|
p_delete(&mouse);
|
||||||
|
mouse = NULL;
|
||||||
|
}
|
||||||
event_handle(event);
|
event_handle(event);
|
||||||
p_delete(&event);
|
p_delete(&event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue