Using FLTK on Raspberry pi.

已查看 55 次
跳至第一个未读帖子

pvr...@btinternet.com

未读,
2023年3月4日 16:44:312023/3/4
收件人 fltk.general
A couple of weeks back I successfully installed FLTK on my raspberry pi. 

However I have now started to port my main application from Windows to the Pi. Apart from a few Windows anomalies (sockets and serial ports) I ran into a problem with native File Browser.

I originally install FLTK with Cmake option -DOPTION_OPEN_GL=OFF. When i ran my app it opened a File browser and then locked up.Using gdb it appears too be in the method Fl_Kdialog_Native_File_Browser_Driver::show().

I scanned the documentation and saw the notes under Fl_Native_File_Browser. I didn't really understand what the various flavours of Linux File browser interface are all about, but I tried setting Fl::option(OPTION_FNFC_USES_ZENITY,true) and this did not make any difference. 

I bit the bullet and re-cloned the fltk git tonight., and rebuilt adding -DOPTION_USE_KDIALOG=OFF and now it no longer locks up. 

I am using the default OS as supplied with the raspberry Pi 4B, but at all au-fait with the various flavours of windows managers that are available. Is what I am doing reasonable and is there a problem with the default behaviour I encountered.

Regards Phil.
已删除帖子
已删除帖子

Manolo

未读,
2023年3月5日 03:32:292023/3/5
收件人 fltk.general
Hi Phil,

OPTION_OPEN_GL has no effect whatsoever on FLTK file choosers.

OPTION_FNFC_USES_ZENITY has effect only under the Plasma desktop, which I presume you don't use on the Pi.

The effect of OPTION_USE_KDIALOG is to determine whether FLTK uses command "kdialog" to create file chooser dialog windows. Could you, please, type in a terminal window this command:
   kdialog --getopenfilename
This should open a file chooser window where you can select a file and then close the dialog, the name of the selected file should then appear in the terminal. Please report here the outcome of this experiment.

If command kdialog runs OK on the Pi, then it should also run when piloted by FLTK. May be FLTK blocks because the kdialog window is hidden in the display behind the main FLTK window or somewhere where you didn't look ? another display? Please report here what you see about this topic. FLTK assumes that if command kdialog is available on the system, its procedure to create a file chooser window with command kdialog and to read the output of this command runs successfully. If that doesn't hold for the Pi, we should do something to fix that.

Ian MacArthur

未读,
2023年3月5日 09:32:012023/3/5
收件人 Fltk General
On 5 Mar 2023, at 08:32, Manolo wrote:
>
> OPTION_OPEN_GL has no effect whatsoever on FLTK file choosers.

Though, tangential to the file-chooser issue, GL does work (more or less..) on the Pi. It’s not always fast, and the stock debian / raspbian / PiOS install doesn’t have the necessary dev libs default, but once you install all the myriad dev packages that debian leaves out it all pretty much Just Works.

Also, if you can be bothered, enabling the (still notionally experimental) Wayland support on the Pi does somewhat improve the GL behaviour (but probably at the cost of “other stuff” located “elsewhere” I suspect!)


>
> OPTION_FNFC_USES_ZENITY has effect only under the Plasma desktop, which I presume you don't use on the Pi.

And I don’t much care for zenity...

>
> The effect of OPTION_USE_KDIALOG is to determine whether FLTK uses command "kdialog" to create file chooser dialog windows. Could you, please, type in a terminal window this command:
> kdialog --getopenfilename
> This should open a file chooser window where you can select a file and then close the dialog, the name of the selected file should then appear in the


The stock PiOS / raspbian desktop, in common with regular debian, is Gnome, not KDE, so you probably want to use the stock Gnome/GTK “native” file chooser.

In my experience, that has always Just Worked, without setting any other options to cmake.

However... I suspect that to detect any of the native file chooser options you need to have the correct dev packages installed on the machine, which (as noted above) debian distros do not by default...
In my case, I’m always adding a bunch of dev stuff anyway; that may go some way to explain why this Just Works for me.
In particular, I add the pango dev packages - I suspect that doing so pulls in a pile of other gtk+ packages.

> terminal. Please report here the outcome of this experiment.
>
> If command kdialog runs OK on the Pi, then it should also run when piloted by FLTK. May be FLTK blocks because the kdialog window is hidden in the display behind the main FLTK window or somewhere where you didn't look ? another display? Please report here what you see about this topic. FLTK assumes that if command kdialog is available on the system, its procedure to create a file chooser window with command kdialog and to read the output of this command runs successfully. If that doesn't hold for the Pi, we should do something to fix that.
>

I’d not bother with kdialog unless you are also installing a bunch of other KDE desktop stuff.
The stock Gnome setup is fine, generally.


> Le samedi 4 mars 2023 à 22:44:31 UTC+1, pvr...@btinternet.com a écrit :
> A couple of weeks back I successfully installed FLTK on my raspberry pi.
>
> However I have now started to port my main application from Windows to the Pi. Apart from a few Windows anomalies (sockets and serial ports) I ran into a problem with native File Browser.
>
> I originally install FLTK with Cmake option -DOPTION_OPEN_GL=OFF. When i ran my app it opened a File browser and then locked up.Using gdb it appears too be in the method Fl_Kdialog_Native_File_Browser_Driver::show().
>
> I scanned the documentation and saw the notes under Fl_Native_File_Browser. I didn't really understand what the various flavours of Linux File browser interface are all about, but I tried setting Fl::option(OPTION_FNFC_USES_ZENITY,true) and this did not make any difference.
>
> I bit the bullet and re-cloned the fltk git tonight., and rebuilt adding -DOPTION_USE_KDIALOG=OFF and now it no longer locks up.
>
> I am using the default OS as supplied with the raspberry Pi 4B, but at all au-fait with the various flavours of windows managers that are available. Is what I am doing reasonable and is there a problem with the default behaviour I encountered.
>
> Regards Phil.
>
> --
> You received this message because you are subscribed to the Google Groups "fltk.general" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/b3c870ee-5bef-4b3e-9380-dc265b6cffbdn%40googlegroups.com.

pvrose

未读,
2023年3月5日 10:27:502023/3/5
收件人 fltkg...@googlegroups.com

On 5 March 2023, at 08:32, Manolo <manol...@gmail.com> wrote:

>
>
>Hi Phil,

Thanks Manolo


>
>OPTION_OPEN_GL has no effect whatsoever on FLTK file choosers.
>

>OPTION_FNFC_USES_ZENITY has effect only under the Plasma desktop, which I presume you don't use on the Pi.
>

>The effect of OPTION_USE_KDIALOG is to determine whether FLTK uses command "kdialog" to create file chooser dialog windows. Could you, please, type in a terminal window this command:
>
>   kdialog --getopenfilename
>

>This should open a file chooser window where you can select a file and then close the dialog, the name of the selected file should then appear in the terminal. Please report here the outcome of this experiment.

This opened a browser ok.

>
>If command kdialog runs OK on the Pi, then it should also run when piloted by FLTK. May be FLTK blocks because the kdialog window is hidden in the display behind the main FLTK window or somewhere where you didn't look ? another display? Please report here what you see about this topic.

What I found was that I was opening the file browser before I showed the main window. If the main window was visible when I opened the browser it worked ok. I seem to have a problem with next one which is a directory browser, but I am still working on this.

Thanks Phil.

FLTK assumes that if command kdialog is available on the system, its procedure to create a file chooser window with command kdialog and to read the output of this command runs successfully. If that doesn't hold for the Pi, we should do something to fix that.
>

>Le samedi 4 mars 2023 à 22:44:31 UTC+1, pvr...@btinternet.com a écrit :
>
>A couple of weeks back I successfully installed FLTK on my raspberry pi. 
>
>However I have now started to port my main application from Windows to the Pi. Apart from a few Windows anomalies (sockets and serial ports) I ran into a problem with native File Browser.
>
>I originally install FLTK with Cmake option -DOPTION_OPEN_GL=OFF. When i ran my app it opened a File browser and then locked up.Using gdb it appears too be in the method Fl_Kdialog_Native_File_Browser_Driver::show().
>
>I scanned the documentation and saw the notes under Fl_Native_File_Browser. I didn't really understand what the various flavours of Linux File browser interface are all about, but I tried setting Fl::option(OPTION_FNFC_USES_ZENITY,true) and this did not make any difference. 
>
>I bit the bullet and re-cloned the fltk git tonight., and rebuilt adding -DOPTION_USE_KDIALOG=OFF and now it no longer locks up. 
>
>I am using the default OS as supplied with the raspberry Pi 4B, but at all au-fait with the various flavours of windows managers that are available. Is what I am doing reasonable and is there a problem with the default behaviour I encountered.
>
>Regards Phil.
>
>--

>You received this message because you are subscribed to a topic in the Google Groups "fltk.general" group.
>To unsubscribe from this topic, visit https://groups.google.com/d/topic/fltkgeneral/PzEfhsd6no4/unsubscribe.
>To unsubscribe from this group and all its topics, send an email to fltkgeneral...@googlegroups.com.

回复全部
回复作者
转发
0 个新帖子