Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SysTray and stdimages examples not work Under Linux #89

Open
benohb opened this issue Feb 8, 2019 · 5 comments
Open

SysTray and stdimages examples not work Under Linux #89

benohb opened this issue Feb 8, 2019 · 5 comments

Comments

@benohb
Copy link

benohb commented Feb 8, 2019

For a while c82999d
SysTray crash in show
stdimages examples Does not display icons

@graemeg
Copy link
Owner

graemeg commented Feb 8, 2019

Can you give more information about your Linux system? What desktop environment (KDE, Gnome 3, Gnome 2, Mate or some specific Window Manager (eg: jwm). What version of the distroy. I've got Ubuntu 18.04 running JWM and the systray example works fine here.

@benohb
Copy link
Author

benohb commented Feb 9, 2019

XUbuntu 18.04 64bit (xfce)
Lazarus 2.0 fpc 3.04 (last stable)
(SysTray crash)
"an unexpected error occurred invalid type cast"
In file 'fpg_x11.pas' at line 4466
FtrayWidget := AOwner as TfpgWindowBase;


(stdimages examples)
There is no error messages
untitled2


Is this a normal thing ??? All versions before this change works fine (SysTray)
untitled

@fredvs
Copy link
Contributor

fredvs commented Feb 9, 2019

Hello.

I did have the same problem with Raspian + xfce.
It was discussed (and solved) in fpGUINews-group, topic " fpGUI and RPi"

http://geldenhuys.co.uk/webnews/webnews.cgi?user=fredvs;showold=true;group=fpgui.support;sortorder=date;article=8200

Hello Graeme.

Well seen, the problem was indeed form that part of code.

Doing this in fpg_x11.pas around line 2406:

 { setup a window icon }

// IconPixMap := XCreateBitmapFromData(xapplication.display, FWinHandle,
// @IconBitmapBits, IconBitmapWidth, IconBitmapHeight);

 WMHints := XAllocWMHints;  // NOT comment this otherwise crash.  

// WMHints^.icon_pixmap := IconPixmap;
// WMHints^.flags := IconPixmapHint;

---> fix the problem of crash of the tray-panel.

The good news is that assigning for a form a custom icon (24 bit from .bpm
into resource) with "TfpgForm.IconName" works.
The icon is perfectly show and no crash with the tray-panel.

Fre;D

Maybe it can help you.

Fre;D

@graemeg
Copy link
Owner

graemeg commented Feb 9, 2019

I can finally reproduce the issue (if AggCanvas) is disabled. I have a good idea on how to solve this.... Due to desktop environments changing systray behaviour. Solution should be applied to to "develop" and "maint" branches in a day or two. Thanks for reporting it.

@benohb
Copy link
Author

benohb commented Feb 9, 2019

Thank you graemeg / fredvs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants