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 18, 2022  
 
I would call anything you dlopen a "plugin". What I call a "library" is directly named by the executable (you can list them on Linux with ldd) and is loaded before the executable is run.

The fact that this plugin when run then dlopen's even more files (as it's own internal plugin system) is not relevant for fltk.

I think the proper behavior for fltk is it should try to load this plugin (what you call the system-provided libdecor, I think). In theory a desktop would customize this file if they think it is important for titlebars to be consistent. If not found, fltk could fallback to drawing the titlebar itself, though I would like an investigation as to whether any proper wayland implementation is missing a plugin.

I do not understand why any of this is a compile-time option, unless one of the options is to *remove* the dlopen and use the fallback always. Even if that is the case, the no-plugin case should not be the default.



On Tue, Jan 18, 2022 at 2:39 AM Manolo <manolo.gouy@gmail.com> wrote:

Le lundi 17 janvier 2022 à 21:16:23 UTC+1, spi...@gmail.com a écrit :
I'm still thoroughly confused, as there are dlload calls in the fltk code for wayland titlebars. This implies it is code to LOAD a "plugin". If it is not capable of loading a system-provided plugin that draws the titlebars then something is seriously wrong. This should not be a compile-time option if one of the options contains a dlload call.

I've a hard time understanding the meaning of this paragraph. Does it refer to the dlopen() call at line 1383 of
file <FLTK source tree>/libdecor/src/libdecor.c ?

The relationship between FLTK and libdecor is exactly the same as that with libpng or libjpeg. FLTK can be built relying on
the system to provide libpng.so or libjpeg.so. Or, if that is not desired for any reason, it can be built using a built-in version
of any of these 2 libs.

If FLTK uses its built-in copy of libdecor, the code path doesn't go to the dlopen() call mentionned above. The code path goes
always to the built-in libdecor-cairo.c which draws all window titlebars and shades.

If FLTK uses the system-provided libdecor shared lib, obviously libdecor.so determines what happens. Libdecor uses a plugin
mechanism to load, via the dlopen() call seen above, another shared lib that implements a small libdecor-defined
API and that does the titlebar drawing job. There's also a libdecor-defined mechanism to determine where libdecor.so
searches for this plugin. At present and to the best of my knowledge, no other shared lib exists than libdecor-cairo.so
which uses Cairo to draw titlebars (with a big fontsize, too big according to some).

At present, the net result is the same in terms of window titlebars because ultimately libdecor-cairo.c does
the drawing in both cases.

If the running Wayland compositor provides SSD (server-side decoration), and independently of whether the system
or the built-in libdecor versions run, no plugin is necessary because the compositor draws titlebars. That can be
put in action running FLTK with the KDE desktop.

--
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/4bb47d18-0d77-4f02-96e7-4cd2fedae749n%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-8oAjBthStXD-h%3DH83%2B0HEy4H3ZX5%3DXy5mr3boSb4ybSi7Fg%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'.