It does this using X11's XTEST extension and other Xlib functions. . followed by mouseup for the given button with a short delay between the two (currently 12ms). Example: % xdotool getmouselocation --shell X=880 Y=443 SCREEN=0 . In X11 terminology, mapping a window means making it visible on the screen..