Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, May 2008
qt 4.4, systemTrayIcon 'gets dirty' on gnome panel after a while


Message 1 in thread

Hi all!

I just wanted to let you know that on the gnome panel my QT4 application
with a system tray icon which is continuously painted depending on the
network traffic (two needle arrows) works FINE until ONE of the
following situations happens:

- another application which displays its system tray icon is launched:
  my system tray icon is moved to give space to the new icon and below
the painted area the image of the other application's tray icon (or part
of it) stays freezed below mine;

- a certain amount of time passes and the icon gets `dirty': portions of
previously drawn paintings remain painted and the background becomes
black!

Other details:

- the background image is a png which contains transparency;
- the refresher of the drawing of the system tray icon creates each time
a new QPixmap, draws on it with QPainter, then I create a
QIcon(pixmap_painted) and i call setIcon on the QSystemTrayIcon.

I also remember that this method in the QT versions < 4.4 used to cause
icon flickering on the system tray sporadically when the QSystemTrayIcon
was updated with the method described above.

Thanks for the attention.

I will try on kde panel to watch for a similar problem and let you know.

Giacomo

--
 [ signature omitted ] 

Message 2 in thread

Hello Giacomo,


On Thu, 29 May 2008 09:20:42 +0200 "Giacomo S." <giacomo.strangolino@xxxxxxxxxxxxxxxxxx> wrote:

> Hi all!
> 
> I just wanted to let you know that on the gnome panel my QT4 application
> with a system tray icon which is continuously painted depending on the
> network traffic (two needle arrows) works FINE until ONE of the
> following situations happens:
> 
> - another application which displays its system tray icon is launched:
>   my system tray icon is moved to give space to the new icon and below
> the painted area the image of the other application's tray icon (or part
> of it) stays freezed below mine;
> 
> - a certain amount of time passes and the icon gets `dirty': portions of
> previously drawn paintings remain painted and the background becomes
> black!
> 
> Other details:
> 
> - the background image is a png which contains transparency;
> - the refresher of the drawing of the system tray icon creates each time
> a new QPixmap, draws on it with QPainter, then I create a
> QIcon(pixmap_painted) and i call setIcon on the QSystemTrayIcon.
> 
> I also remember that this method in the QT versions < 4.4 used to cause
> icon flickering on the system tray sporadically when the QSystemTrayIcon
> was updated with the method described above.
> 
> Thanks for the attention.
> 
> I will try on kde panel to watch for a similar problem and let you know.

FYI: this is exactly how psi's (Qt4) and skype's (Qt IIRC) trayicons
behave here too (GNOME 2.20.3, Fedora 8). That kind of thing doesn't
happen w/ GTK+ applications.


Regards,

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: PGP signature


Message 3 in thread

El jue, 29-05-2008 a las 10:07 +0200, wwp escribiÃ:
> Hello Giacomo,
> 
> 
> On Thu, 29 May 2008 09:20:42 +0200 "Giacomo S." <giacomo.strangolino@xxxxxxxxxxxxxxxxxx> wrote:
> 
> > Hi all!
> > 
> > I just wanted to let you know that on the gnome panel my QT4 application
> > with a system tray icon which is continuously painted depending on the
> > network traffic (two needle arrows) works FINE until ONE of the
> > following situations happens:
> > 
> > - another application which displays its system tray icon is launched:
> >   my system tray icon is moved to give space to the new icon and below
> > the painted area the image of the other application's tray icon (or part
> > of it) stays freezed below mine;
> > 
> > - a certain amount of time passes and the icon gets `dirty': portions of
> > previously drawn paintings remain painted and the background becomes
> > black!
> > 
> > Other details:
> > 
> > - the background image is a png which contains transparency;
> > - the refresher of the drawing of the system tray icon creates each time
> > a new QPixmap, draws on it with QPainter, then I create a
> > QIcon(pixmap_painted) and i call setIcon on the QSystemTrayIcon.
> > 
> > I also remember that this method in the QT versions < 4.4 used to cause
> > icon flickering on the system tray sporadically when the QSystemTrayIcon
> > was updated with the method described above.
> > 
> > Thanks for the attention.
> > 
> > I will try on kde panel to watch for a similar problem and let you know.
> 
> FYI: this is exactly how psi's (Qt4) and skype's (Qt IIRC) trayicons
> behave here too (GNOME 2.20.3, Fedora 8). That kind of thing doesn't
> happen w/ GTK+ applications.

w/ is with or without??

Do you mean it is a problem of the gnome system tray??

Thanks

> 
> 
> Regards,
> 

--
 [ signature omitted ] 

Message 4 in thread

29 мая 2008, в 15:21, Giacomo S. написал(а):
>
> w/ is with or without??
>
> Do you mean it is a problem of the gnome system tray??


It's "with".

Psi icon bug also reproducible in KDE3.5 tray.

-- 
 [ signature omitted ] 

Message 5 in thread

Hello Giacomo,


On Thu, 29 May 2008 14:21:33 +0200 "Giacomo S." <giacomo.strangolino@xxxxxxxxxxxxxxxxxx> wrote:

> El jue, 29-05-2008 a las 10:07 +0200, wwp escribió:
> > Hello Giacomo,
> > 
> > 
> > On Thu, 29 May 2008 09:20:42 +0200 "Giacomo S." <giacomo.strangolino@xxxxxxxxxxxxxxxxxx> wrote:
> > 
> > > Hi all!
> > > 
> > > I just wanted to let you know that on the gnome panel my QT4 application
> > > with a system tray icon which is continuously painted depending on the
> > > network traffic (two needle arrows) works FINE until ONE of the
> > > following situations happens:
> > > 
> > > - another application which displays its system tray icon is launched:
> > >   my system tray icon is moved to give space to the new icon and below
> > > the painted area the image of the other application's tray icon (or part
> > > of it) stays freezed below mine;
> > > 
> > > - a certain amount of time passes and the icon gets `dirty': portions of
> > > previously drawn paintings remain painted and the background becomes
> > > black!
> > > 
> > > Other details:
> > > 
> > > - the background image is a png which contains transparency;
> > > - the refresher of the drawing of the system tray icon creates each time
> > > a new QPixmap, draws on it with QPainter, then I create a
> > > QIcon(pixmap_painted) and i call setIcon on the QSystemTrayIcon.
> > > 
> > > I also remember that this method in the QT versions < 4.4 used to cause
> > > icon flickering on the system tray sporadically when the QSystemTrayIcon
> > > was updated with the method described above.
> > > 
> > > Thanks for the attention.
> > > 
> > > I will try on kde panel to watch for a similar problem and let you know.
> > 
> > FYI: this is exactly how psi's (Qt4) and skype's (Qt IIRC) trayicons
> > behave here too (GNOME 2.20.3, Fedora 8). That kind of thing doesn't
> > happen w/ GTK+ applications.
> 
> w/ is with or without??

Sorry, w/ is with, w/o is without. GTK+ trayicons don't show such
problems within the GNOME panel here.


> Do you mean it is a problem of the gnome system tray??

Knowing that my previous email involves Qt trayicons and GNOME panel,
it's either Qt's fault or GNOME panel's fault or both. I can't say
more.. it's just user observations.


Regards,

-- 
 [ signature omitted ] 

Message 6 in thread

Hi,

> [...]
> - another application which displays its system tray icon is launched:
>   my system tray icon is moved to give space to the new icon and below
> the painted area the image of the other application's tray icon (or part
> of it) stays freezed below mine;

This would rather look like an issue with the Gnome system tray.

> - a certain amount of time passes and the icon gets `dirty': portions of
> previously drawn paintings remain painted and the background becomes
> black!

I'm not able to reproduce either problem on Fedora 9 (KDE 4.0.4 or Gnome 
2.22.0) but then I may need to modify my example program.

> Other details:
> 
> - the background image is a png which contains transparency;
> - the refresher of the drawing of the system tray icon creates each time
> a new QPixmap, draws on it with QPainter, then I create a
> QIcon(pixmap_painted) and i call setIcon on the QSystemTrayIcon.

My example program is the one posted in the thread about flickering. See 
below. Can you post a minimal, compilable example program that reproduces the 
problem?

> I also remember that this method in the QT versions < 4.4 used to cause
> icon flickering on the system tray sporadically when the QSystemTrayIcon
> was updated with the method described above.

You're referring to this thread:
http://lists.trolltech.com/qt-interest/2007-11/thread00118-0.html

I think this flickering has been fixed, although I can find no relevant entry 
in the task tracker :-(

-- 
 [ signature omitted ] 

Message 7 in thread

El jue, 29-05-2008 a las 20:27 +0200, Dimitri escribiÃ:
> Hi,

Hi!

> 
> > [...]
> > - another application which displays its system tray icon is launched:
> >   my system tray icon is moved to give space to the new icon and below
> > the painted area the image of the other application's tray icon (or part
> > of it) stays freezed below mine;
> 
> This would rather look like an issue with the Gnome system tray.
> 
> > - a certain amount of time passes and the icon gets `dirty': portions of
> > previously drawn paintings remain painted and the background becomes
> > black!
> 
> I'm not able to reproduce either problem on Fedora 9 (KDE 4.0.4 or Gnome 
> 2.22.0) but then I may need to modify my example program.

Yes, using your systray example, just replace one of your iconX.png
with a png containing transparency, like the one i attach in this email,
and you will soon notice the problem, just wait some time or add/remove 
some other icons of other applications to/from the gnome system tray.

Thanks for your attention.

Giacomo.

> 
> > Other details:
> > 
> > - the background image is a png which contains transparency;
> > - the refresher of the drawing of the system tray icon creates each time
> > a new QPixmap, draws on it with QPainter, then I create a
> > QIcon(pixmap_painted) and i call setIcon on the QSystemTrayIcon.
> 
> My example program is the one posted in the thread about flickering. See 
> below. Can you post a minimal, compilable example program that reproduces the 
> problem?
> 
> > I also remember that this method in the QT versions < 4.4 used to cause
> > icon flickering on the system tray sporadically when the QSystemTrayIcon
> > was updated with the method described above.
> 
> You're referring to this thread:
> http://lists.trolltech.com/qt-interest/2007-11/thread00118-0.html
> 
> I think this flickering has been fixed, although I can find no relevant entry 
> in the task tracker :-(
> 

Attachment:

Attachment: icon0.png
Description: PNG image


Message 8 in thread

Hi,

> Yes, using your systray example, just replace one of your iconX.png

There are no iconX.png files in my example. I'll try reproducing the problem, 
time permitting. However I would recommend filing a bug report:
	http://trolltech.com/bugreport-form

> with a png containing transparency, like the one i attach in this email,
> and you will soon notice the problem, just wait some time or add/remove 
> some other icons of other applications to/from the gnome system tray.

-- 
 [ signature omitted ] 

Message 9 in thread

Hi,

> Yes, using your systray example, just replace one of your iconX.png
> with a png containing transparency, like the one i attach in this email,
> and you will soon notice the problem, just wait some time or add/remove 
> some other icons of other applications to/from the gnome system tray.

Oh, you mean the Qt example in examples/desktop/systray? This one doesn't have 
iconX.png files either, just *.svg files. I replaced one of the *.svg files by 
your icon, but I'm unable to reproduce any problem on Fedora 9.

Could you maybe post a minimal, compilable example that reproduces the problem 
on your computer?

-- 
 [ signature omitted ]