FLTK logo

Re: [fltk.general] Transparent window

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.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Transparent window "'Matthias Melcher' via fltk.general" Jun 20, 2022  
 

holm.h...@gmail.com schrieb am Sonntag, 19. Juni 2022 um 15:30:05 UTC+2:

Based on the nice work by Matthias, I make a FL_Group in my Fl_Gl_Window. This do support transparent colors, as can be seen in the attached image.

Oh, wow, thanks for the screenshot. This looks really great!
 
This looks just like I wanted. However there are a few issues:
1) The event handling is not always ok. I suspect that my Fl_Gl_Window captrues it. This may be my mistake.

You need to override Fl_Gl_Window::handle() and make sure that your new function still calls the original handle() function. If that returns 1, the even was handled by the children or the GL window. Only if it was not handled (returning 0), you should add your own action (and then return 1 yourself if you handled the event, and 0 if not).

It is entirely possible though that I messed something up in the event handler. If you can get me more details, I'll be happy to dive in and find out, where the events are mishandled.
 
2) Clicking on the buttons causes a redraw, and that may lead to the Fl_Group is "blinking". Is the problem that my Fl_Gl_Window/draw() uses too much time ?

Redrawing a UI within a GL window is different to a regular window. A GL window must always be redrawn in its entirety (*including* the 3D scene in the background), whereas system windows use clipping and other tricks to redraw only what's needed. Again, I'll be happy to look into that, but I will need more detail, and probably some sample source code that shows the unexpected behaviour. The overridden Fl_Gl_Window::draw() function should redraw the entire 3D scene first, and then call the original draw() function.

Hope that helps,

 Matthias
 

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/1a9dfa3e-66eb-4179-b128-ca3ac67e6b73n%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'.