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

Function x11_QueryPointer

source/x11/x11common.cpp:560–584  ·  view source on GitHub ↗

Bool XQueryPointer(Display* display, Window w, Window* root_return, Window* child_return, int* root_x_return, int* root_y_return, int* win_x_return, int* win_y_return, unsigned int* mask_return)

Source from the content-addressed store, hash-verified

558
559// Bool XQueryPointer(Display* display, Window w, Window* root_return, Window* child_return, int* root_x_return, int* root_y_return, int* win_x_return, int* win_y_return, unsigned int* mask_return)
560static void x11_QueryPointer(CPU* cpu) {
561 KMemory* memory = cpu->memory;
562 XServer* server = XServer::getServer();
563 XWindowPtr window = server->getWindow(ARG2);
564 XWindowPtr root = server->getRoot();
565
566 if (!window) {
567 EAX = BadWindow;
568 return;
569 }
570 S32 x = 0;
571 S32 y = 0;
572 KNativeSystem::getCurrentInput()->getMousePos(&x, &y);
573 memory->writed(ARG3, root->id);
574
575 XWindowPtr child = root->getWindowFromPoint(x, y);
576 memory->writed(ARG4, child->id);
577 memory->writed(ARG5, x);
578 memory->writed(ARG6, y);
579 window->screenToWindow(x, y);
580 memory->writed(ARG7, x);
581 memory->writed(ARG8, y);
582 memory->writed(ARG9, server->getInputModifiers());
583 EAX = Success;
584}
585
586// int XmbTextListToTextProperty(Display* display, char** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return)
587static void x11_MbTextListToTextProperty(CPU* cpu) {

Callers

nothing calls this directly

Calls 6

getWindowMethod · 0.80
getMousePosMethod · 0.80
getWindowFromPointMethod · 0.80
screenToWindowMethod · 0.80
writedMethod · 0.45
getInputModifiersMethod · 0.45

Tested by

no test coverage detected