[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#875629: marked as done (accerciser: can't access object content and highlight without compositor)



Your message dated Sun, 22 Oct 2017 16:03:46 +0000
with message-id <E1e6Ij4-00034k-Mf@fasolo.debian.org>
and subject line Bug#875629: fixed in accerciser 3.22.0-3
has caused the Debian Bug report #875629,
regarding accerciser: can't access object content and highlight without compositor
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
875629: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875629
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: accerciser
Version: 3.22.0-2
Severity: important
Tags: a11y patch upstream
Owner: bugs@hypra.fr
User: bugs@hypra.fr
Usertags: hypra
Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=787592

Hello,

My desktop doesn't include a compositor.  When I click on an object in
the at-spi tree, I get this in the accerciser output:

Traceback (most recent call last):

+ Trace 237951

  • File "/usr/lib/python3/dist-packages/accerciser/accessible_treeview.py", line 839 in _onSelectionChanged
    self.node.update(new_acc)

  • File "/usr/lib/python3/dist-packages/accerciser/node.py", line 100 in update
    self.highlight()
  • File "/usr/lib/python3/dist-packages/accerciser/node.py", line 134 in highlight 2.0, 0)
  • File "/usr/lib/python3/dist-packages/accerciser/node.py", line 222 in __init__
    self.root = gdk.get_default_root_window().get_image(

AttributeError: 'X11Window' object has no attribute 'get_image'

and I don't get attributes, content, etc. of the object.

Indeed, get_image is something that got removed between gtk+2.0 and
gtk+3.0, it seems the migration in accerciser didn't fix that part,
probably because the maintainer does use a compositor.

This is a problem because it makes accerciser basically unusable when
not running a compositor. The attached patch fixes it by replacing
the gtk+2.0 implementation (which can't work anyway) with an X11
implementation (gtk+3.0 does not provide the features needed here).

I'll commit the patch to the repository, this is more for documenting
the issue, for reference to potentially backport the fix to Stretch.

Samuel

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages accerciser depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.26.0-2+b1
ii  gir1.2-atk-1.0                               2.24.0-1
ii  gir1.2-gdkpixbuf-2.0                         2.36.5-2
ii  gir1.2-glib-2.0                              1.53.2-4
ii  gir1.2-gtk-3.0                               3.22.19-1
ii  gir1.2-pango-1.0                             1.40.11-1
ii  gir1.2-rsvg-2.0                              2.40.18-1
ii  gir1.2-wnck-3.0                              3.24.1-1
ii  ipython3                                     5.1.0-3
ii  python3                                      3.5.3-3
ii  python3-cairo                                1.10.0+dfsg-5+b3
ii  python3-pyatspi                              2.24.0+dfsg-1

accerciser recommends no packages.

accerciser suggests no packages.

-- no debconf information

-- 
Samuel
/*
 * [...] Note that 120 sec is defined in the protocol as the maximum
 * possible RTT.  I guess we'll have to use something other than TCP
 * to talk to the University of Mars.
 * PAWS allows us longer timeouts and large windows, so once implemented
 * ftp to mars will work nicely.
 */
(from /usr/src/linux/net/inet/tcp.c, concerning RTT [retransmission timeout])
---
 src/lib/accerciser/node.py |   29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 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,
@@ -219,8 +218,8 @@ class _HighLight(gtk.Window):
       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)
+      #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

--- End Message ---
--- Begin Message ---
Source: accerciser
Source-Version: 3.22.0-3

We believe that the bug you reported is fixed in the latest version of
accerciser, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 875629@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Samuel Thibault <sthibault@debian.org> (supplier of updated accerciser package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 22 Oct 2017 17:43:56 +0200
Source: accerciser
Binary: accerciser
Architecture: source
Version: 3.22.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Accessibility Team <debian-accessibility@lists.debian.org>
Changed-By: Samuel Thibault <sthibault@debian.org>
Description:
 accerciser - interactive Python accessibility explorer for the GNOME desktop
Closes: 848119 875629
Changes:
 accerciser (3.22.0-3) unstable; urgency=medium
 .
   * 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.
   * control: Change priority from extra to optional.
Checksums-Sha1:
 46965ac18e0a740eaf8b20e7db3a1f1690f66335 2323 accerciser_3.22.0-3.dsc
 e086a55f1b534cb28af735deb093d3347de6a0ca 12976 accerciser_3.22.0-3.debian.tar.xz
Checksums-Sha256:
 40568ce5788a138739496b696f57a29441fbfeea16aa8d717f025a2a068c3922 2323 accerciser_3.22.0-3.dsc
 99e9876e24cb945d6e6ea79206809e6eb559cd4c918a90fd845a1f96627efc8e 12976 accerciser_3.22.0-3.debian.tar.xz
Files:
 2e0f368cfdb941ef8ba26c0d141cd0f7 2323 gnome optional accerciser_3.22.0-3.dsc
 41f44014d75047e007ec1fe3612382ef 12976 gnome optional accerciser_3.22.0-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErr90SPq5RTpFUjkOsKUb9YyRecUFAlnsvgsACgkQsKUb9YyR
ecVc6A//fQRUcfUzq9UNUMNNqGzjCz09KI1SqWANcM3ADD/f88MpbkC+b927TS3A
R247+7zMOCLFk0IFyuSaA3d9YM9AodY68g1OkoIee1d4XhA8CiA8V2IybHdeiATj
wG6H4MroZN2FuqP7qDpSTiGkGsA8GqMbYqbd+FqYbvBRQsIfcPqKRXZlEEsaEodd
1DN1WljAC178dVKGtt00BoSE3uYuF3Y3gkeT2LGgzxajk1bpsoUkvqudaHPKt756
Pbk5dM1zhP7WpYiomtKIw8Kket+z7+qfo3sFCL/fOQ5aONgVKwdrWBJ7QcNoq7Zn
jyBsVTjSeKyFokXseAOQBtNa6unK1V62d7jFgshKtjCc18fPceJQeSPxgWCg/iIH
vRezihBBK3pHX1Yzziuplb0arnHk0KLTy0Li/ntMmyXXPMnS/aeU8Db/YxVYwc+n
iEvxGLcAuhnfL6n1Q4EtVTgfNMbScXVVRvlLFfOBFUhVa5sZAs4foPSfToXKunsY
PQZ9pWOhzPuG9xUEckzqct0TGE4kvdtWl1nH+9e5b9z65yho4hAa05pNHRHyRxNX
X5IK5I0s+tSPYae3J9qRCixM11jR95kIElLZ01kDYTwHqaCuJ4wZfPbwwUE36BIQ
HqIqq4648zEtoyZhNTHfL/AyXjFIwsxExOxFVQh4TP/u44hZric=
=pAGz
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: