| 889 | } |
| 890 | |
| 891 | int XServer::unmapWindow(const DisplayDataPtr& data, const XWindowPtr& window) { |
| 892 | if (server->trace) { |
| 893 | BString log; |
| 894 | |
| 895 | log.append(data->displayId, 16); |
| 896 | log += " UnmapWindow"; |
| 897 | log += " window="; |
| 898 | log.append(window->id, 16); |
| 899 | klog(log.c_str()); |
| 900 | } |
| 901 | if (grabbedId == window->id) { |
| 902 | ungrabPointer(0); |
| 903 | } |
| 904 | int result = window->unmapWindow(); |
| 905 | |
| 906 | if (result == Success) { |
| 907 | int x = 0; |
| 908 | int y = 0; |
| 909 | |
| 910 | KNativeSystem::getCurrentInput()->getMousePos(&x, &y, false); |
| 911 | |
| 912 | XWindowPtr wnd = root->getWindowFromPoint(x, y); |
| 913 | if (wnd) { |
| 914 | if (wnd != server->pointerWindow) { |
| 915 | server->pointerMoved(server->pointerWindow, wnd, x, y, NotifyNormal); |
| 916 | server->pointerWindow = wnd; |
| 917 | } |
| 918 | } |
| 919 | } |
| 920 | return result; |
| 921 | } |
| 922 | |
| 923 | void XServer::mouseMove(S32 x, S32 y, bool relative) { |
| 924 | if (isGrabbed) { |
nothing calls this directly
no test coverage detected