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

Method mapWindow

source/x11/xserver.cpp:863–889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863int XServer::mapWindow(const DisplayDataPtr& data, const XWindowPtr& window) {
864 if (server->trace) {
865 BString log;
866
867 log.append(data->displayId, 16);
868 log += " MapWindow";
869 log += " window=";
870 log.append(window->id, 16);
871 klog(log.c_str());
872 }
873 int result = window->mapWindow();
874
875 if (result == Success) {
876 int x = 0;
877 int y = 0;
878 KNativeSystem::getCurrentInput()->getMousePos(&x, &y, false);
879
880 XWindowPtr wnd = root->getWindowFromPoint(x, y);
881 if (wnd) {
882 if (wnd != server->pointerWindow) {
883 server->pointerMoved(server->pointerWindow, wnd, x, y, NotifyNormal);
884 server->pointerWindow = wnd;
885 }
886 }
887 }
888 return result;
889}
890
891int XServer::unmapWindow(const DisplayDataPtr& data, const XWindowPtr& window) {
892 if (server->trace) {

Callers

nothing calls this directly

Calls 6

klogFunction · 0.85
getMousePosMethod · 0.80
getWindowFromPointMethod · 0.80
pointerMovedMethod · 0.80
appendMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected