MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / ungrabPointer

Method ungrabPointer

source/x11/xserver.cpp:1050–1072  ·  view source on GitHub ↗

https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:UngrabPointer

Source from the content-addressed store, hash-verified

1048
1049// https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:UngrabPointer
1050U32 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
1074U32 XServer::createColorMap(const Visual* visual, int alloc) {
1075 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(colorMapMutex);

Callers 1

x11_UngrabPointerFunction · 0.80

Calls 4

getMousePosMethod · 0.80
getWindowFromPointMethod · 0.80
setCursorMethod · 0.80
getCursorMethod · 0.45

Tested by

no test coverage detected