--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/2f54295b-a4d4-ecb2-c62b-14668d0fd70f%40online.de.
I'll try that ASAP, but likely not tomorrow because I need to do some
other stuff.
Regarding the code changes: WOW, that's a lot of code!
The following is just for my curiosity:
I'm seeing also that much code has been copied which might not be needed
due to the driver structure. What are your plans, will you do a mass
cleanup when the Wayland code is (almost) finished? I'm asking because
I'm concerned about duplicated code. One example seems to be timer
related code which could be reused rather than duplicated etc. etc.. I
take it that you first copied the entire driver code and are now working
on fleshing out the needed changes and what doesn't need to be changed.
Is that about correct?
Interesting. I see that you added the library to the FLTK repo. Are
there plans to (finally) bundle it or would we take it as a prerequisite
to be installed by developers? Generally I'd prefer the latter, but I
don't know how well it is supported by (Linux) distros. Can you share
your thoughts about this?
This all seems like a good idea.
Using that existing libdecor code is probably an ok start, but I would like to see it done reusing as much functionality from FLTK as possible. It does look like that code is pretty minimal (ie it does not link with GTK) so that is a relief. In the end the FlWindow object would do all of this.
I assume this is using Cairo for rendering? You should, as that is what the titlebar code is using. The Cairo code needs to be fixed up so it is an acceptable backend for FLTK, and use the same cairo api in both the X11 and Wayland versions.
Le dimanche 6 juin 2021 à 21:03:01 UTC+2, Albrecht Schlosser a écrit :
I'll try that ASAP, but likely not tomorrow because I need to do some
other stuff.
I'm looking forward to your feedback.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/eccc8fa7-ccb8-4882-5de4-ca59d6f847df%40online.de.
On 6/7/21 12:03 PM, Albrecht Schlosser wrote:
On 6/7/21 8:44 AM Manolo wrote:
Le dimanche 6 juin 2021 à 21:03:01 UTC+2, Albrecht Schlosser a écrit :
I'll try that ASAP, but likely not tomorrow because I need to do some
other stuff.
I'm looking forward to your feedback.
Well, not really much feedback, I just played with the demo programs. I'm really impressed how well everything is already. Great job!
Conclusion: Using Cairo doesn't seem to be that slow in conjunction with Wayland which uses (AFAICT) memory mapped buffers for communication (rather than sockets or network connections like X11 does). How does "local X11" communicate? Anybody?
On 6/7/21 1:51 PM, Albrecht Schlosser wrote:
There was a good reason Wayland wanted CSD.
What is CSD? Client Server XXX ???
Pretty sure that's "Client Side Decorations"
https://blogs.gnome.org/tbernard/2018/01/26/csd-initiative/
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/60E28EC3-E2DE-4B98-B0B9-C8AADA9CE3C3%40gmail.com.
On 6/7/21 2:26 PM, Bill Spitzak wrote:
What I meant for Device was to replace it with code like this:
#if X11#include <X11code.C>#elif Windows#include <Windowscode.C>
I had used that technique in the native file chooser, but it was changed.
That technique was generally recommended IIRC in an old O'Reilly book
on multiple platform code management I've had for decades now.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/13c59d6a-ef8b-298b-c932-e3858c8803dc%40online.de.
test/doublebuffer runs "faster than ever seen" and there's no noticeable difference between single and double buffer which is what I expected. Manolo, there is no difference, right?
test/glpuzzle does "funny things" (TM) if you let the game rotate (drag the mouse and see). Borders disappear, sometime there's a see-through effect.
Not all cursors appear as they should (test/cursor).
Screen scaling (ctrl/+/-/0) doesn't seem to work yet. Maybe in GL windows though (not sure). I've seen some weird effects.
test/resize-example* programs seem all to crash like this:
$ ./resize-example1
makeWindow:0x22499c0 wl_compositor_create_surface=0x2253bc0 scale=1
Segmentation fault (core dumped)
Oh, and one thing I did not expect:
./configure --enable-wayland --enable-cairo
doesn't work together. There are compilation errors (I don't remember exactly, something about fl_gc and unsupported platform; I could reproduce it but I'd need to reconfigure the build). I take it this is just the platform tests in some header files, but anyway, that's not important at all.
Manolo, well done! It's awesome to see that FLTK can work with Wayland.
Conclusion: Using Cairo doesn't seem to be that slow in conjunction with Wayland which uses (AFAICT) memory mapped buffers for communication (rather than sockets or network connections like X11 does). How does "local X11" communicate? Anybody?
Manolo, would you like me to add CMake support? I'd like to help if I can.
Read through the libdecor code and it appears to be drawing everything directly. There is a "plugin", perhaps with the intention that the style of the window borders can change by changing the plugin, but I don't agree with this as the api to the plugin is going to swiftly grow to a baroque monstrosity, just like every other attempt to control the borders. There was a good reason Wayland wanted CSD. I personally do not see any problem with drawing the window borders ourselves, any complaint that they look different is IMHO not logical if the difference in appearance of every other widget is considered acceptable. Also not using this library will mean a single Wayland surface can be used, instead of two.
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?)
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?
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."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 compatiblewith desktops (and I believe KDE is one) that provide server-side decoration (SSD).
Le lundi 7 juin 2021 à 21:03:45 UTC+2, Albrecht Schlosser a écrit :
test/doublebuffer runs "faster than ever seen" and there's no noticeable difference between single and double buffer which is what I expected. Manolo, there is no difference, right?
Yes. There's no such thing as a Wayland single window because it's not possible with Wayland to draw in the window. All drawing goes to a buffer, and then this buffer is "committed" to Wayland. The two windows of test/doublebuffer follow exactly the same code.
test/glpuzzle does "funny things" (TM) if you let the game rotate (drag the mouse and see). Borders disappear, sometime there's a see-through effect.
Bill's hint below about the z buffer is probably the way to look to fix that. Help needed. I dont know GL.
Not all cursors appear as they should (test/cursor).
Yes, that happens with some Ubuntu themes but not all, and not with Debian, where all cursor shapes work.Cursors are searched in a system folder and some shapes are absent for some Ubuntu themes. Who knows why?
Screen scaling (ctrl/+/-/0) doesn't seem to work yet. Maybe in GL windows though (not sure). I've seen some weird effects.
Wayland was born when HighDPI existed, so it contains natively a way to handle HighDPI in the form of an integer scale whose valuegrows with pixel density. FLTK apps follow this scaling without need for change nor ctrl/+/.
Go to Settings -> Display -> Scale and set it to 200% or 300 % on a large display, you'll see FLTK Wayland apps follow the change.
They're not adaptive while running yet, though.
Manolo, would you like me to add CMake support? I'd like to help if I can.
Yes I do. Many thanks.
But I believe we should first decide whether we want to include Wayland in the FLTK repoand whether we do that as a new branch, or in the main branch, just like Android or Pico.
I would also appreciate feedback about use on a native Linux system (as opposed to a virtual machine).
On 6/8/21 8:52 AM Manolo wrote:
I would also appreciate feedback about use on a native Linux system (as opposed to a virtual machine).
I'll try to test on my bare metal Linux when time permits. I think I did already install 'weston' so I could maybe run it directly on my notebook.
Go to Settings -> Display -> Scale and set it to 200% or 300 % on a large display, you'll see FLTK Wayland apps follow the change.I can't find such a setting in my Ubuntu VM. I only have "Resolution" and "Fractional Scaling" (see screenshot).
FLTK apps don't seem to honor the environment variable FLTK_SCALING_FACTOR completely (see image). The scaling factor is recognized though (scale: 1.30) in both cases.
The 'mandelbrot' demo displays a trace of rectangles when you select a
part of the image by dragging the mouse, see screenshot. It's redrawn
correctly after releasing the mouse button.
Le mercredi 9 juin 2021 à 12:44:10 UTC+2, Albrecht Schlosser a écrit :
The 'mandelbrot' demo displays a trace of rectangles when you select a
part of the image by dragging the mouse, see screenshot. It's redrawn
correctly after releasing the mouse button.
Yes, I know and have that in my TODO list.
After git pull, use with Weston should now be much improved.
Does Mint lack the wayland-enabled gnome desktop?
Do you know how to configure the keyboard layout with Weston?
BTW: since you disabled the usage of the FLTK_SCALING_FACTOR environment variable in commit 2e715259ef30c (IIRC) FLTK apps crash when you type ctrl/+ (which is actually worse than before):
Please add the minimal attached patch to the wayland branch. This does not solve the entire dependency mess, but it enables all testers to execute `make depend' to update the dependencies rather than always using `make clean', although libdecor is not included (which leaves this as another source of trouble). The created 'makedepend' files are not compatible with the 'master' branch and should not be committed but can be used for testing.
I'll try to get CMake working which will resolve the dependency issues for free.
Do you know how to configure the keyboard layout with Weston?
Le jeudi 10 juin 2021 à 01:21:58 UTC+2, Albrecht Schlosser a écrit :
Please add the minimal attached patch to the wayland branch. This does not solve the entire dependency mess, but it enables all testers to execute `make depend' to update the dependencies rather than always using `make clean', although libdecor is not included (which leaves this as another source of trouble). The created 'makedepend' files are not compatible with the 'master' branch and should not be committed but can be used for testing.
Done.
Is it expected to receive loads ofmakedepend: warning: Fl.cxx (reading ../FL/fl_utf8.h, line 32): cannot find include file "stdio.h"
not in ../stdio.h
makedepend: warning: Fl.cxx (reading ../FL/Fl.H, line 45): cannot find include file "string.h"
not in ../string.h
?
Regarding test/keyboard: display of Fl::event_key(): I just fixed a display error which has been missed since we moved to UTF-8.
This has been fixed in master, commit 986a8b33a2. Now keypresses in the full latin1 (ISO-8859-1) range are displayed correctly.
You can either rebase the wayland branch on upstream/master or …
As I'm one of the few who asked for Wayland support - this makes me VERY happy :) - thank you!
I tried it - looking good so far.The only little problem I had with building it was with the libdecor library, only had to change one line to get there:libdecor/build/Makefile, lines 28 and 29
it's on archlinux, but would apply to manjaro etc also... the only file thats in there is "dbus-arch-deps.h". and arch has also the same file in /usr/lib64/dbus-1.0 also... for whatever reason...hint:[code]pkg-config --cflags dbus-1
[/code]
Glad you're happy.
Could you share your experience with your FLTK apps + Wayland?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1d723adb-1c3e-7768-9e48-5d0cd89eceab%40online.de.
Here's an excerpt of maybe
related environment vars:
DESKTOP_SESSION=cinnamon
XDG_SESSION_DESKTOP=cinnamon
XDG_SESSION_TYPE=x11
WAYLAND_DISPLAY=wayland-0
On 9/1/21 10:07 AM, Manolo wrote:
The candidate source code for a new wayland platform for FLTK has progressed.OpenGL views now behave correctly. All reported glitches have been repaired.
All test programs now run well both with Mutter and Weston, expect those thatask for window positionning or unminimizing which is impossible with Wayland.
This all sounds great! Thanks so much Manolo.
While I don't have Wayland yet, I'll be upgrading my workstation
in the near future, and if it ends up having Wayland under the hood,
I'll be sure to give it a test.
I specially focussed on improving Weston support, even if libdecor is not adapted to it.To support window minimization under Weston, the titlebar disappearsalso when the window becomes inactive. That makes minimizationand Super+Tab unminimization working corectly under Weston.It would be possible to have the titlebar disappear only when a windowgets minimized by fiddling somewhat inside libdecor.
On 9/2/21 6:44 AM, Manolo wrote:
As of today, window minimization and Super+Tab unminimization work almostcorrectly under Weston; the only drawback is that the titlebar disappears froma minimized window while it's being previewed by Super+Tab.
By "Super+Tab" that means..
..right?+Tab, or..
+ Tab
On 9/2/21 6:44 AM, Manolo wrote:
As of today, window minimization and Super+Tab unminimization work almostcorrectly under Weston; the only drawback is that the titlebar disappears froma minimized window while it's being previewed by Super+Tab.
By "Super+Tab" that means..
..right?+Tab, or..
+ Tab
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/54decf1c-d8de-4c59-b686-088e782b707en%40googlegroups.com.
FLTK should probably rename the key "Super" as well to be consistent. When it was made I expected X to call that key "Meta".
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/aa5bf9bd-acd9-47e3-a95f-071c1dc0cd76n%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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/c1862f6e-1a7e-435c-96f8-4702196257ean%40googlegroups.com.
I am not clear on why part of it is in a different library, rather than just part of libfltk.
Will any of this work be helpful for also getting the X11 version to use Cairo?