Пример #1
0
    def warp_pointer(self,
                     x,
                     y,
                     src_window=X.NONE,
                     src_x=0,
                     src_y=0,
                     src_width=0,
                     src_height=0,
                     onerror=None):
        """Move the pointer relative its current position by the offsets
        (x, y). However, if src_window is a window the pointer is only
        moved if the specified rectangle in src_window contains it. If
        src_width is 0 it will be replaced with the width of src_window -
        src_x. src_height is treated in a similar way.

        To move the pointer to absolute coordinates, use Window.warp_pointer()."""
        request.WarpPointer(display=self.display,
                            onerror=onerror,
                            src_window=src_window,
                            dst_window=X.NONE,
                            src_x=src_x,
                            src_y=src_y,
                            src_width=src_width,
                            src_height=src_height,
                            dst_x=x,
                            dst_y=y)
Пример #2
0
    def warp_pointer(self, x, y, src_window = 0, src_x = 0, src_y = 0,
                     src_width = 0, src_height = 0, onerror = None):

        request.WarpPointer(display = self.display,
                            onerror = onerror,
                            src_window = src_window,
                            dst_window = self.id,
                            src_x = src_x,
                            src_y = src_y,
                            src_width = src_width,
                            src_height = src_height,
                            dst_x = x,
                            dst_y = y)