https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:UngrabPointer
| 1048 | |
| 1049 | // https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:UngrabPointer |
| 1050 | U32 XServer::ungrabPointer(U32 time) { |
| 1051 | if (!grabbedId) { |
| 1052 | return GrabSuccess; // :TODO: couldn't find this use case in the x11 spec |
| 1053 | } |
| 1054 | XWindowPtr prev = getWindow(grabbedId); |
| 1055 | { |
| 1056 | BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(this->grabbedMutex); |
| 1057 | this->grabbedId = 0; |
| 1058 | this->grabbedDisplayId = 0; |
| 1059 | this->grabbedConfinedId = 0; |
| 1060 | this->isGrabbed = false; |
| 1061 | } |
| 1062 | S32 x = 0; |
| 1063 | S32 y = 0; |
| 1064 | KNativeSystem::getCurrentInput()->getMousePos(&x, &y); |
| 1065 | |
| 1066 | pointerWindow = root->getWindowFromPoint(x, y); |
| 1067 | if (pointerWindow && prev) { |
| 1068 | pointerMoved(prev, pointerWindow, x, y, NotifyUngrab); |
| 1069 | KNativeSystem::getScreen()->setCursor(pointerWindow->getCursor()); |
| 1070 | } |
| 1071 | return GrabSuccess; |
| 1072 | } |
| 1073 | |
| 1074 | U32 XServer::createColorMap(const Visual* visual, int alloc) { |
| 1075 | BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(colorMapMutex); |
no test coverage detected