FLTK logo

Re: [fltk.coredev] Please vote: add a Wayland platform to FLTK

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Please vote: add a Wayland platform to FLTK Bill Spitzak Jan 20, 2022  
 
It sounds like the GTK required a modification to libdecor, I'm guessing they wanted the API to the plugin altered? Was it a major change, or only a minor addition?

My vague impression is the best method for fltk is to implement this api (by including the source code to libdecor) on the assumption that it will be able to load more plugins than the unmodified one. However I don't think fltk should include any plugins, instead there should be a compiled-in fallback that is used if the plugin could not be found or does not load. This will allow a statically-linked fltk program to be distributed as a single executable. This fallback probably should be extremely simple though it should draw the window title text at least.

On Thu, Jan 20, 2022 at 3:12 PM Manolo <manolo.gouy@gmail.com> wrote:


Le jeudi 20 janvier 2022 à 21:51:55 UTC+1, spi...@gmail.com a écrit :
What I don't understand is why you are not actually testing a *plugin*. The code for drawing using GTK should not be part of fltk. IMHO the code in fltk should look for the libdecor plugin and if found load it and use it. If not found then there could be a fallback, probably using a copy of the decor-cairo code, or even something simpler using fltk drawing functions.

Unless we are actually loading plugins that dlload code is *not* being tested and that is wrong.

It works. I did this :
- build with meson + ninja the libdecor software containing the libdecor-gtk.c addition;
- this creates 3 shared libs: libdecor-0.so, libdecor-cairo.so, libdecor-gtk.so.
The last 2 are plugins, one of which is loaded by dlopen() by the 1st shared lib.
- define environment var LIBDECOR_PLUGIN_DIR to the directory containing libdecor-gtk.so
(this variable is the means for libdecor to discover its plugin)
- re-build FLTK with OPTION_USE_SYSTEM_LIBDECOR set to ON
- run an FLTK app: its window appears in GTK-style.

Events are :
libfltk calls libdecor which is found in libdecor-0.so, that from the Debian package libdecor-0;
libdecor-so loads with dlopen() the plugin it finds in $LIBDECOR_PLUGIN_DIR,
this plugin, libdecor-gtk.so, draws a GTK-styled window titlebar.

I believe that's not a procedure adequate for public use because it requires to download a modified
version of libdecor according to a pending Merge Request and to use meson + ninja.
That procedure should become practical once the code in the merge request will have found its way
up into Linux packages.


--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/7a672a3f-19a2-40c5-b430-27758f9b19c3n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/CAL-8oAjW3hizTz1Vm1cLZq_9xTcFBkZkvjasZ9nsMwv-iq-z%3DA%40mail.gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.