I added gdk2x unit to wsgtk2trayicon file, so now the Gtk2 file is exactly like Gtk1 file, except for the uses clause.

Specifically the following lines are now just like Gtk1 file:

procedure TWidgetTrayIcon.CreateForm(id: Integer);
begin
.....
fDisplay := GDK_WINDOW_XDISPLAY(Pointer(PGtkWidget(GtkForm.Handle)^.window));
//  SHowMessage(IntToStr(Integer(fDisplay)));
fWindow := GDK_WINDOW_XWINDOW (Pointer(PGtkWidget(GtkForm.Handle)^.window));
  fScreen := XDefaultScreenOfDisplay(fDisplay); // get the screen
  fScreenID := XScreenNumberOfScreen(fScreen); // and it's number
end;

Yet, the exact same problem occurs.

So, can I suppose that the problem is not related to the above lines??

Is space for the icon allocated in the tray - i.e. is there a "hole"  ?

Yes, space for the icon is allocated in the tray, but it is fully grey. I know that this is my window, because the grey on the background of lazarus programs is sligtly different from the gray on KDE taskbar.

- and it just doesnt draw or doesn't "anything" happen? In your version,
check the value of fWindow and use "xwininfo -id xxxxx" to see if it's
correct...

It doesn't draw the icon and it doesn't respond to events, like OnClick.

Most of those kind of problems with lowlevel X stuff not getting
executed properly have to do with the widget not being realized yet...
Might want to make double-sure that it is :)

How can I check if the widget is being realized??

thanks,

Felipe

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to