Codebase list mirage / a9c84fb
Fix screenshot code Thomas Ross 3 years ago
1 changed file(s) with 1 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
28202820 height = Gdk.Screen.height()
28212821 else:
28222822 (x, y, width, height) = xmouse.geometry()
2823 pix = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, True, 8, width, height)
2824 pix = pix.get_from_drawable(
2825 root_win, Gdk.colormap_get_system(), x, y, 0, 0, width, height
2826 )
2823 pix = Gdk.pixbuf_get_from_window(root_win, x, y, width, height)
28272824 # Save as /tmp/mirage-<random>/filename.ext
28282825 tmpdir = tempfile.mkdtemp(prefix="mirage-") + "/"
28292826 tmpfile = tmpdir + "screenshot.png"