fix get invisible cursor

This commit is contained in:
Denis Fomin 2013-01-04 16:40:18 +04:00
parent 04e92b0398
commit fb6240f1c5
1 changed files with 5 additions and 3 deletions

View File

@ -433,9 +433,11 @@ def get_pixbuf_from_data(file_data, want_type = False):
return pixbuf
def get_invisible_cursor():
pixmap = Gdk.Pixmap(None, 1, 1, 1)
color = Gdk.Color()
cursor = Gdk.Cursor.new(pixmap, pixmap, color, color, 0, 0)
import cairo
s = cairo.ImageSurface(cairo.FORMAT_A1, 1, 1)
cursor_pixbuf = Gdk.pixbuf_get_from_surface(s, 0, 0, 1, 1)
cursor = Gdk.Cursor.new_from_pixbuf(Gdk.Display.get_default(), \
cursor_pixbuf, 0, 0)
return cursor
def get_current_desktop(window):