+static void check_pointer_not_disturbed(void) {
+ Window got_root, got_child;
+ int got_root_x, got_root_y;
+ int got_win_x, got_win_y;
+ unsigned got_mask;
+
+ int r= XQueryPointer(disp,id, &got_root,&got_child,
+ &got_root_x, &got_root_y,
+ &got_win_x, &got_win_y,
+ &got_mask);
+ if (!r ||
+ got_win_x!=commod_page_point.x ||
+ got_win_y!=commod_page_point.y) {
+ progress("");
+ fprintf(stderr,"\nunexpected mouse position:"
+ " samescreen=%d got=%dx%d want=%dx%d",
+ r, got_win_x,got_win_y,
+ commod_page_point.x,commod_page_point.y);
+ fatal("Mouse pointer moved.");
+ }
+}
+