Bug 976440 - gnome-shell does something wrong with images (breaking pyatspi .get_image*() methods)
gnome-shell does something wrong with images (breaking pyatspi .get_image*() ...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnome-shell (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Florian Müllner
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2013-06-20 10:55 EDT by Matěj Cepl
Modified: 2017-06-01 21:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
testing script (2.00 KB, text/x-python)
2013-06-20 10:55 EDT, Matěj Cepl
no flags Details
universal testing script (561 bytes, text/x-python)
2013-06-20 11:05 EDT, Matěj Cepl
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 702753 None None None Never

  None (edit)
Description Matěj Cepl 2013-06-20 10:55:26 EDT
Created attachment 763487 [details]
testing script

Description of problem:
When trying to discover which notification is urgent and which is not, I try to investigate which icon is shown in the gnome-shell. With the attached script I generate a notification via libnotify and then I try to investigate it with pyatspi (usually I would use dogtail, but in order to eliminate its possible guilt in the action, I am using only plain pyatspi). The result of running this script on my system is

matej@wycliff: libnotify (rhel-7 *%)$ ./sample_reproducer.py 
DEBUG:<module>:found 173 icon elements.
DEBUG:<module>:images = None
('summary', <Accessible object at 0x7f67c9807910 (AtspiAccessible at 0x10fe5d0)>)
matej@wycliff: libnotify (rhel-7 *%)$ 

I don't think that line

DEBUG:<module>:images = None

is right. In order to eliminate possible bug with pyatspi I have also created this simple testing script:

# -*- coding: utf-8 -*-
import pyatspi, sys
from pyatspi.utils import findAllDescendants, findDescendant

def isAppNamed(node):
    return (node.getRoleName() == 'application') and \
           (node.name == appname)

appname = sys.argv[1]

root = pyatspi.Registry.getDesktop(0)
app = findDescendant(root, isAppNamed, breadth_first=True)
print("app = %s" % app)

icons = findAllDescendants(app, lambda x: x.getRoleName() == 'image')

print("found %d icon elements." % len(icons))

for ico in icons:
    print("images = %s" % icons[0].get_image())

When I run it against for example Firefox (e.g., running ./app_reproducer.py Firefox) I get number of informations about images.

Therefore the only culprit seems to me to be gnome-shell which somehow doesn't provide to pyatspi proper information. That unfortunately breaks my QA efforts.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.run the above shown script for Firefox to see pyatspi API is working
2.run ./sample_reproducer.py

Actual results:
see above

Expected results:
the .get_icon*() methods should return proper data for the icons.

Additional info:
Comment 1 Matěj Cepl 2013-06-20 11:05:56 EDT
Created attachment 763489 [details]
universal testing script

Of course the testing script I have pasted into the text of the bug has a bug itself. This is a corrected version.
Comment 3 RHEL Product and Program Management 2014-03-22 02:46:09 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Note You need to log in before you can comment on or make changes to this bug.