Codebase list accerciser / 9d0a116
Fix using accerciser without a compositor * Add patches/03_get_image.patch to fix accessing items without a compositor (Closes: #875629) * control: Add python3-xlib dependency. sthibault 6 years ago
5 changed file(s) with 83 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
00 accerciser (3.22.0-3) UNRELEASED; urgency=medium
11
2 * Add debian/patches/02_ipython5.patch to fix python console (Closes: #848119)
2 * control: Update Uploaders.
3 * Add patches/02_ipython5.patch to fix python console (Closes: #848119)
4 * Add patches/03_get_image.patch to fix accessing items without a compositor
5 (Closes: #875629)
6 * control: Add python3-xlib dependency.
37
48 -- Samuel Thibault <sthibault@debian.org> Tue, 12 Sep 2017 16:54:50 +0200
59
55 Section: gnome
66 Priority: extra
77 Maintainer: Debian Accessibility Team <debian-accessibility@lists.debian.org>
8 Uploaders: Jordi Mallach <jordi@debian.org>, Mario Lang <mlang@debian.org>, Michael Biebl <biebl@debian.org>
8 Uploaders: Jordi Mallach <jordi@debian.org>, Michael Biebl <biebl@debian.org>, Sebastian Dröge <slomo@debian.org>
99 Build-Depends: debhelper (>= 10),
1010 dh-python,
1111 gnome-pkg-tools (>= 0.10)
1616 libgtk-3-dev (>= 3.1.13),
1717 pkg-config,
1818 python3 (>= 3.2),
19 python3-xlib,
1920 python-gi-dev (>= 3.4.2),
2021 python3-pyatspi2 (>= 2.5.2)
2122 X-Python3-Version: >= 3.2
1212 libgtk-3-dev (>= 3.1.13),
1313 pkg-config,
1414 python3 (>= 3.2),
15 python3-xlib,
1516 python-gi-dev (>= 3.4.2),
1617 python3-pyatspi2 (>= 2.5.2)
1718 X-Python3-Version: >= 3.2
0 ---
1 src/lib/accerciser/node.py | 33 ++++++++++++++++-----------------
2 1 file changed, 16 insertions(+), 17 deletions(-)
3
4 --- a/src/lib/accerciser/node.py
5 +++ b/src/lib/accerciser/node.py
6 @@ -24,6 +24,8 @@ import pyatspi
7 import string
8 from .tools import ToolsAccessor, parseColorString
9
10 +import Xlib, Xlib.display
11 +
12 MAX_BLINKS = 6
13
14 gsettings = GSettings.new('org.a11y.Accerciser')
15 @@ -147,14 +149,11 @@ class Node(GObject.GObject, ToolsAccesso
16 self.max_blinks = times
17 self.blinks = 0
18 # get info for drawing higlight rectangles
19 - display = gdk.Display.get_default()
20 - screen = display.get_default_screen()
21 - self.root = screen.get_root_window()
22 - self.gc = self.root.new_gc()
23 - self.gc.set_subwindow(gdk.SubwindowMode.INCLUDE_INFERIORS)
24 - self.gc.set_function(gdk.Function.INVERT)
25 - self.gc.set_line_attributes(3, gdk.LineStyle.ON_OFF_DASH, \
26 - gdk.CapStyle.BUTT, gdk.JoinStyle.MITER)
27 + display = Xlib.display.Display()
28 + screen = display.screen()
29 + self.root = screen.root
30 + self.gc = w.create_gc(subwindow_mode = Xlib.X.IncludeInferiors, function = Xlib.X.GXinvert)
31 +
32 self.inv = gtk.Invisible()
33 self.inv.set_screen(screen)
34 GLib.timeout_add(30, self._drawRectangle)
35 @@ -167,7 +166,7 @@ class Node(GObject.GObject, ToolsAccesso
36 if self.blinks == 0:
37 self.inv.show()
38 self.inv.grab_add()
39 - self.root.draw_rectangle(self.gc, False,
40 + self.root.fill_rectangle(self.gc,
41 self.extents.x,
42 self.extents.y,
43 self.extents.width,
44 @@ -217,10 +216,10 @@ class _HighLight(gtk.Window):
45 screen = self.get_screen()
46 visual = screen.get_rgba_visual()
47 self.set_visual(visual)
48 - else:
49 - # Take a screenshot for compositing on the client side.
50 - self.root = gdk.get_default_root_window().get_image(
51 - self.x, self.y, self.w, self.h)
52 + #else:
53 + # Take a screenshot for compositing on the client side.
54 + # self.root = gdk.get_default_root_window().get_image(
55 + # self.x, self.y, self.w, self.h)
56
57 # Place window, and resize it, and set proper properties.
58 self.set_app_paintable(True)
59 @@ -265,10 +264,10 @@ class _HighLight(gtk.Window):
60 if not self._composited:
61 # Draw the screengrab of the underlaying window, and set the drawing
62 # operator to OVER.
63 - self.window.draw_image(self.style.black_gc, self.root,
64 - event.area.x,event.area.y,
65 - event.area.x, event.area.y,
66 - event.area.width, event.area.height)
67 + #self.window.draw_image(self.style.black_gc, self.root,
68 + # event.area.x,event.area.y,
69 + # event.area.x, event.area.y,
70 + # event.area.width, event.area.height)
71 cairo_operator = cairo.OPERATOR_OVER
72 else:
73 cairo_operator = cairo.OPERATOR_SOURCE
00 01_remove_site_package_version.patch
11 02_ipython5.patch
2 03_get_image.patch