| 1133 |
@@ -1133,7 +1133,11 @@ |
| 1133 |
|
| 1134 |
// flush Enter events caused by keygrabbing
|
| 1135 |
XEvent e;
|
| 1136 |
while (XCheckTypedEvent(_screen->getDpy(), EnterNotify, &e));
|
| 1137 |
while (XCheckTypedEvent(_screen->getDpy(), EnterNotify, &e)) {
|
| 1138 |
if (! e.xcrossing.send_event) {
|
| 1139 |
_screen->setLastEventTime(e.xcrossing.time);
|
| 1140 |
}
|
| 1141 |
}
|
| 1142 |
}
|
| 1143 |
|
| 1144 |
//! @brief
|
| ... |
|
| 1145 |
@@ -1141,7 +1145,11 @@ |
| 1145 |
WindowManager::handleButtonPressEvent(XButtonEvent *ev)
|
| 1146 |
{
|
| 1147 |
// Clear event queue
|
| 1144 |
while (XCheckTypedEvent(_screen->getDpy(), ButtonPress, (XEvent *) ev));
|
| 1149 |
while (XCheckTypedEvent(_screen->getDpy(), ButtonPress, (XEvent *) ev)) {
|
| 1150 |
if (! ev->send_event) {
|
| 1151 |
_screen->setLastEventTime(ev->time);
|
| 1152 |
}
|
| 1153 |
}
|
| 1154 |
|
| 1155 |
ActionEvent *ae = NULL;
|
| 1156 |
PWinObj *wo = NULL;
|
| ... |
|
| 1193 |
@@ -1185,7 +1193,11 @@ |
| 1193 |
WindowManager::handleButtonReleaseEvent(XButtonEvent *ev)
|
| 1194 |
{
|
| 1195 |
// Flush ButtonReleases
|
| 1188 |
while (XCheckTypedEvent(_screen->getDpy(), ButtonRelease, (XEvent *) ev));
|
| 1197 |
while (XCheckTypedEvent(_screen->getDpy(), ButtonRelease, (XEvent *) ev)) {
|
| 1198 |
if (! ev->send_event) {
|
| 1199 |
_screen->setLastEventTime(ev->time);
|
| 1200 |
}
|
| 1201 |
}
|
| 1202 |
|
| 1203 |
ActionEvent *ae = NULL;
|
| 1204 |
PWinObj *wo = PWinObj::findPWinObj(ev->window);
|
| ... |
|
| 1419 |
@@ -1407,7 +1419,11 @@ |
| 1419 |
WindowManager::handleEnterNotify(XCrossingEvent *ev)
|
| 1420 |
{
|
| 1421 |
// Clear event queue
|
| 1410 |
while (XCheckTypedEvent(_screen->getDpy(), EnterNotify, (XEvent *) ev));
|
| 1423 |
while (XCheckTypedEvent(_screen->getDpy(), EnterNotify, (XEvent *) ev)) {
|
| 1424 |
if (! ev->send_event) {
|
| 1425 |
_screen->setLastEventTime(ev->time);
|
| 1426 |
}
|
| 1427 |
}
|
| 1428 |
|
| 1429 |
if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab)) {
|
| 1430 |
return;
|
| ... |
|
| 1453 |
@@ -1437,7 +1453,11 @@ |
| 1453 |
WindowManager::handleLeaveNotify(XCrossingEvent *ev)
|
| 1454 |
{
|
| 1455 |
// Clear event queue
|
| 1440 |
while (XCheckTypedEvent(_screen->getDpy(), LeaveNotify, (XEvent *) ev));
|
| 1457 |
while (XCheckTypedEvent(_screen->getDpy(), LeaveNotify, (XEvent *) ev)) {
|
| 1458 |
if (! ev->send_event) {
|
| 1459 |
_screen->setLastEventTime(ev->time);
|
| 1460 |
}
|
| 1461 |
}
|
| 1462 |
|
| 1463 |
if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab)) {
|
| 1464 |
return;
|
| ... |
|
| 1505 |
@@ -1485,8 +1505,16 @@ |
| 1505 |
// all EnterNotify and LeaveNotify as they can interfere with
|
| 1506 |
// focusing if Sloppy or Follow like focus model is used.
|
| 1507 |
XEvent e_flush;
|
| 1488 |
while (XCheckTypedEvent(_screen->getDpy(), EnterNotify, &e_flush));
|
| 1489 |
while (XCheckTypedEvent(_screen->getDpy(), LeaveNotify, &e_flush));
|
| 1510 |
while (XCheckTypedEvent(_screen->getDpy(), EnterNotify, &e_flush)) {
|
| 1511 |
if (! e_flush.xcrossing.send_event) {
|
| 1512 |
_screen->setLastEventTime(e_flush.xcrossing.time);
|
| 1513 |
}
|
| 1514 |
}
|
| 1515 |
while (XCheckTypedEvent(_screen->getDpy(), LeaveNotify, &e_flush)) {
|
| 1516 |
if (! e_flush.xcrossing.send_event) {
|
| 1517 |
_screen->setLastEventTime(e_flush.xcrossing.time);
|
| 1518 |
}
|
| 1519 |
}
|
| 1520 |
|
| 1521 |
PWinObj *focused_wo = PWinObj::getFocusedPWinObj(); // convenience
|
| 1522 |
|
| ... |
|