Commit 9d0a1168 authored by sthibault's avatar sthibault

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.
parent 7250e743
accerciser (3.22.0-3) UNRELEASED; urgency=medium
* Add debian/patches/02_ipython5.patch to fix python console (Closes: #848119)
* control: Update Uploaders.
* Add patches/02_ipython5.patch to fix python console (Closes: #848119)
* Add patches/03_get_image.patch to fix accessing items without a compositor
(Closes: #875629)
* control: Add python3-xlib dependency.
-- Samuel Thibault <sthibault@debian.org> Tue, 12 Sep 2017 16:54:50 +0200
......
......@@ -6,7 +6,7 @@ Source: accerciser
Section: gnome
Priority: extra
Maintainer: Debian Accessibility Team <debian-accessibility@lists.debian.org>
Uploaders: Jordi Mallach <jordi@debian.org>, Mario Lang <mlang@debian.org>, Michael Biebl <biebl@debian.org>
Uploaders: Jordi Mallach <jordi@debian.org>, Michael Biebl <biebl@debian.org>, Sebastian Dröge <slomo@debian.org>
Build-Depends: debhelper (>= 10),
dh-python,
gnome-pkg-tools (>= 0.10)
......@@ -17,6 +17,7 @@ Build-Depends-Indep: yelp-tools,
libgtk-3-dev (>= 3.1.13),
pkg-config,
python3 (>= 3.2),
python3-xlib,
python-gi-dev (>= 3.4.2),
python3-pyatspi2 (>= 2.5.2)
X-Python3-Version: >= 3.2
......
......@@ -13,6 +13,7 @@ Build-Depends-Indep: yelp-tools,
libgtk-3-dev (>= 3.1.13),
pkg-config,
python3 (>= 3.2),
python3-xlib,
python-gi-dev (>= 3.4.2),
python3-pyatspi2 (>= 2.5.2)
X-Python3-Version: >= 3.2
......
---
src/lib/accerciser/node.py | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
--- a/src/lib/accerciser/node.py
+++ b/src/lib/accerciser/node.py
@@ -24,6 +24,8 @@ import pyatspi
import string
from .tools import ToolsAccessor, parseColorString
+import Xlib, Xlib.display
+
MAX_BLINKS = 6
gsettings = GSettings.new('org.a11y.Accerciser')
@@ -147,14 +149,11 @@ class Node(GObject.GObject, ToolsAccesso
self.max_blinks = times
self.blinks = 0
# get info for drawing higlight rectangles
- display = gdk.Display.get_default()
- screen = display.get_default_screen()
- self.root = screen.get_root_window()
- self.gc = self.root.new_gc()
- self.gc.set_subwindow(gdk.SubwindowMode.INCLUDE_INFERIORS)
- self.gc.set_function(gdk.Function.INVERT)
- self.gc.set_line_attributes(3, gdk.LineStyle.ON_OFF_DASH, \
- gdk.CapStyle.BUTT, gdk.JoinStyle.MITER)
+ display = Xlib.display.Display()
+ screen = display.screen()
+ self.root = screen.root
+ self.gc = w.create_gc(subwindow_mode = Xlib.X.IncludeInferiors, function = Xlib.X.GXinvert)
+
self.inv = gtk.Invisible()
self.inv.set_screen(screen)
GLib.timeout_add(30, self._drawRectangle)
@@ -167,7 +166,7 @@ class Node(GObject.GObject, ToolsAccesso
if self.blinks == 0:
self.inv.show()
self.inv.grab_add()
- self.root.draw_rectangle(self.gc, False,
+ self.root.fill_rectangle(self.gc,
self.extents.x,
self.extents.y,
self.extents.width,
@@ -217,10 +216,10 @@ class _HighLight(gtk.Window):
screen = self.get_screen()
visual = screen.get_rgba_visual()
self.set_visual(visual)
- else:
- # Take a screenshot for compositing on the client side.
- self.root = gdk.get_default_root_window().get_image(
- self.x, self.y, self.w, self.h)
+ #else:
+ # Take a screenshot for compositing on the client side.
+ # self.root = gdk.get_default_root_window().get_image(
+ # self.x, self.y, self.w, self.h)
# Place window, and resize it, and set proper properties.
self.set_app_paintable(True)
@@ -265,10 +264,10 @@ class _HighLight(gtk.Window):
if not self._composited:
# Draw the screengrab of the underlaying window, and set the drawing
# operator to OVER.
- self.window.draw_image(self.style.black_gc, self.root,
- event.area.x,event.area.y,
- event.area.x, event.area.y,
- event.area.width, event.area.height)
+ #self.window.draw_image(self.style.black_gc, self.root,
+ # event.area.x,event.area.y,
+ # event.area.x, event.area.y,
+ # event.area.width, event.area.height)
cairo_operator = cairo.OPERATOR_OVER
else:
cairo_operator = cairo.OPERATOR_SOURCE
01_remove_site_package_version.patch
02_ipython5.patch
03_get_image.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment