FLTK logo

Re: [fltk.coredev] Towards a Wayland platform for the FLTK library ?

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: Towards a Wayland platform for the FLTK library ? Albrecht Schlosser Jun 08, 2021  
 
On 6/8/21 9:30 AM Manolo wrote:
Here's an investigation with gdb on program test/hello searching for what context calls static function draw_title_text()
from libdecor's src/plugin/cairo/libdecor-cairo.c which draws the text of window titlebars :

1) When a window is first created, libfltk code calls libdecor code which draws the window title :

#0  ... (call stack elided)
 
2) Each time the window is deactivated or activated, its titlebar gets redrawn.
This is done by libfltk calling libwayland-client.so which calls libffi.so (what is it?)

FYI, from the docs of libffi:
"The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time. FFI stands for Foreign Function Interface."
https://github.com/libffi/libffi

This is obviously used to call plugins in a portable way.

which calls libdecor-0.1.so to draw the title :

#0  ...

This, I interpret as showing that a shared library plugin is necessary for libdecor. Am I wrong?

It seems like plugins are the used to implement actual decorations/themes:

From the docs (README) of libdecor:
"... libdecor will look for plugins in the target directory of the installation. Therefore, when running the demos directly from the build directory, no plugins will be found and the fallback plugin without any decorations will be used."
https://gitlab.gnome.org/jadahl/libdecoration

FLTK could stop pulling in future libdecor updates when we would feel it's becoming
'a baroque monstrosity'.
I understand that FLTK could do CSD drawing a custom titlebar in the same surface as the window main area.
I see this path has not been followed by libdecor. May be it's because libdecor wants to be compatible
with desktops (and I believe KDE is one) that provide server-side decoration (SSD).

Whatever the reasoning behing libdecor is and notwithstanding the option to draw only into one buffer I think that we can independently investigate if it makes sense for us to draw the decorations ourselves. I do also think that an option to not draw decorations at all (particularly the title bar) would be useful so programs can draw their own "header bar" if they are modified to do so. But this is a future issue and not necessary for functional evaluation of the Wayland port.

--
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/16937f5d-6b35-0198-29cf-341dcb45a61e%40online.de.
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'.