]> git.decadent.org.uk Git - videolink.git/blob - warp_pointer.cpp
Increased number of frames in menu, defined a cell covering each menu, and moved...
[videolink.git] / warp_pointer.cpp
1 // Copyright 2006 Ben Hutchings <ben@decadent.org.uk>.
2 // See the file "COPYING" for licence details.
3
4 #include "warp_pointer.hpp"
5
6 #include <gdk/gdkx.h>
7
8 // Move the pointer by (dx, dy) relative to its current position on
9 // the display which window appears on.  
10 // This is separated from videolink.cpp solely because it uses Xlib
11 // and Xlib.h defines many macros we don't want.
12 void warp_pointer(const Glib::RefPtr<Gdk::Window> & window, int dx, int dy)
13 {
14     XWarpPointer(gdk_x11_drawable_get_xdisplay(window->gobj()), None, None,
15                  0, 0, 0, 0, dx, dy);
16 }