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 Manolo Jan 20, 2022  
  Le vendredi 21 janvier 2022 à 06:33:55 UTC+1, spi...@gmail.com a écrit :
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?
The 2 plugins use exactly the same API in their communication with libdecor.
The single change to libdecor was the addition of one source file libdecor-gtk.c.
That's reflected in the fact that FLTK with OPTION_USE_SYSTEM_LIBDECOR to ON, which uses the libdecor-0.so of the Debian package
and dlopen's libdecor-gtk.so of the GTK-extended modified libdecor source code, runs well.

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.
We agree on that, for a future situation when GTK-styled plugins will be available to FLTK users.

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.
I'd say that libdecor-cairo.c  does an excellent fallback mechanism.

There remains an issue. FLTK needs access to the pixel array of the titlebar to implement features that draw decorated windows.
That's not part of the libdecor public API.
I've put in libfltk a function that gives access to this pixel array for the cairo-style titlebars and another one for the GTK-style ones.
The problem is that libfltk needs to know which one to use.
Practically, access to the pixels of window titlebars doesn't work now with OPTION_USE_SYSTEM_LIBDECOR to ON and with the
GTK-style plugin because it uses the function adequate for the other plugin. Everythink works with OPTION_USE_SYSTEM_LIBDECOR
turned OFF.
The ideal solution for us would be for libdecor to add one piece to its public API: access to the pixel array of a window titlebar.

--
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/43445750-b1ba-4ac8-ab87-ea671a03091an%40googlegroups.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'.