Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

Systray application is started from Session in Gnome but it is invisible

10 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Roland Turcan

Hello General mailing list!

How can I solve the following:

I wrote a small utility which is systray application and time to time shows a form to inform user. When I put this into sessions of gnome, then the application is started (I can see it among processes), but it is invisible.
If I start it on system with KDE 3.x+ then it is started and shown correctly.

How can I avoid this strange behavior?

Thanks in advance.

Reply by email

Roland Turcan
to Felipe Monteiro de Carvalho

Hello Felipe,

Orgh, of course I use SVN versions only.
If it was really fixed, then it doesn't work.

in lpr file look like:

  Application.Initialize;
  Application.ShowMainForm := FALSE;
  Application.CreateForm(TMainForm, MainForm);
  Application.Run;

in main form in create I have:

  TrayIcon.Visible := TRUE;

but I think, for this problem is TTrayIcon, because it could show me any window which is shown using by timer. I will try to get up-to-date fpc too from SVN and I will inform you.

TRoland;

<<< 18.12.2008 19:48 - Felipe Monteiro de Carvalho "" >>>

Roland Turcan wrote
> - The latest one Lazarus > - fpc from end of november I think.

FMdC> What does latest mean? 0.9.26?

FMdC> If you are using 0.9.26 try updating to subversion.

FMdC> If you are using subversion, try 0.9.26

FMdC> There was a recent change that could either fix your problem or cause it

Reply by email

Felipe Monteiro de Carvalho
to Roland Turcan

What is "session" in gnome? it is started together with gnome?

I think that what happens is that when it starts the tray area isn't working yet

but I think, for this problem is TTrayIcon, because it could show me any window which is shown using by timer. I will try to get up-to-date fpc too from SVN and I will inform you.

No, this will be useless.

Please try an older lazarus revision, for example 17600

svn up -r 17600

Felipe Monteiro de Carvalho

Reply by email

Roland Turcan
to Felipe Monteiro de Carvalho

Hello Felipe,

FMdC> What is "session" in gnome? it is started together with gnome?

Sessions are in Gnome for setting of application to be started with user's session.

FMdC> I think that what happens is that when it starts the tray area isn't working yet

Of course, that this is the reason. But is it a bug of Gnome or LCL? KDE doesn't have this problem.

FMdC> No, this will be useless.

Yes are right, I did it and no difference.

FMdC> Please try an older lazarus revision, for example 17600

FMdC> svn up -r 17600

I will try it. But I think, that I started to write this small app with older Lazarus (AFAIR from september) and it was the same. Therefore I tried to get fresh svn.

---

My temporary solution, because of time pressure:

I used the timer which I anyway have on my invisible form to hide and show trayicon in first 5 minutes every minute. I know, that to repeat it 5 times is not really necessary, but for slower computers. ;-)

TRoland;

<<< 18.12.2008 22:18 - Felipe Monteiro de Carvalho "" >>> FMdC> What is "session" in gnome? it is started together with gnome?

FMdC> I think that what happens is that when it starts the tray area isn't working yet

> but I think, for this problem is TTrayIcon, because it could show me > any window which is shown using by timer. I will try to get up-to-date > fpc too from SVN and I will inform you.

FMdC> No, this will be useless.

FMdC> Please try an older lazarus revision, for example 17600

FMdC> svn up -r 17600

Reply by email

Felipe Monteiro de Carvalho
to Roland Turcan

Check the result of your TTrayIcon.Show operation.

If it is false, then it failed (because the Tray are isn't loaded yet).

This is what was fixed recently.

So you can implement something like a timer which runs every minute or so and tryes to show the icon. If it succeds, then the timer can stop itself.

Felipe Monteiro de Carvalho

Reply by email

Roland Turcan
to Felipe Monteiro de Carvalho

Hello Felipe,

FMdC> So you can implement something like a timer which runs every minute or FMdC> so and tryes to show the icon. If it succeds, then the timer can stop FMdC> itself.

As I wrote, I use timer anyway. To call Show for TrayIcon is not big problem.

Thanks for your help.

TRoland;

<<< 18.12.2008 22:42 - Felipe Monteiro de Carvalho "" >>> FMdC> Check the result of your TTrayIcon.Show operation.

FMdC> If it is false, then it failed (because the Tray are isn't loaded yet).

FMdC> This is what was fixed recently.

FMdC> So you can implement something like a timer which runs every minute or FMdC> so and tryes to show the icon. If it succeds, then the timer can stop FMdC> itself.

Reply by email