File: warp_pointer.cpp

package info (click to toggle)
videolink 1.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 368 kB
  • ctags: 502
  • sloc: cpp: 3,210; ansic: 880; makefile: 121
file content (16 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2006 Ben Hutchings <ben@decadent.org.uk>.
// See the file "COPYING" for licence details.

#include "warp_pointer.hpp"

#include <gdk/gdkx.h>

// Move the pointer by (dx, dy) relative to its current position on
// the display which window appears on.  
// This is separated from videolink.cpp solely because it uses Xlib
// and Xlib.h defines many macros we don't want.
void warp_pointer(const Glib::RefPtr<Gdk::Window> & window, int dx, int dy)
{
    XWarpPointer(gdk_x11_drawable_get_xdisplay(window->gobj()), None, None,
		 0, 0, 0, 0, dx, dy);
}