Bug 976440

Summary: gnome-shell does something wrong with images (breaking pyatspi .get_image*() methods)
Product: Red Hat Enterprise Linux 7 Reporter: Matěj Cepl <mcepl>
Component: gnome-shellAssignee: Florian Müllner <fmuellner>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mclasen, mdomonko
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=702753
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-11 18:05:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
testing script
none
universal testing script none

Description Matěj Cepl 2013-06-20 14:55:26 UTC
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:

#!/usr/bin/python
# -*- 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):
pyatspi-2.8.0-2.el7.noarch
gnome-shell-3.8.3-2.el7.x86_64

How reproducible:
100%

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

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 15:05:56 UTC
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 Program Management 2014-03-22 06:46:09 UTC
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.