Get relative position of mouse in a window in x11
I need to get the relative position of mouse pointer in the window in which it is clicked, i've coded to capture the click event, but when i use this code
result = XQueryPointer(disp, XRootWindow(disp,0),&win, &win, &root_x, &root_y, &win_x, &win_y, &mask_retur开发者_开发问答n);
it shows the global position of mouse when printing win_x and win_y
only window i have is "win" the display is "disp"
Found out evt.xbutton.x and evt.xbutton.y returns window relative mouse co ordinates
精彩评论