program exits after Fl_Window.hide()

8 views
Skip to first unread message

Rodolfo Borges

unread,
Aug 9, 2021, 12:27:01 AM8/9/21
to fltk.general
My program have a "splash" window that shows before the "main" window.

On my machine (Windows 7) it works fine, but on my partner's machine (Windows 10) the program abruptly ends as soon as I call hide() on the splash window.
 
(On Linux and Mac it works ok, too.)

Any ideas?

Can it be a Windows 7 vs 10 difference, or something else? If so, I could install Windows 10 here and try to debug inside FLTK's hide() code.

Greg Ercolano

unread,
Aug 9, 2021, 12:32:32 AM8/9/21
to fltkg...@googlegroups.com

On 8/8/21 5:54 PM, Rodolfo Borges wrote:

My program have a "splash" window that shows before the "main" window.
On my machine (Windows 7) it works fine, but on my partner's machine (Windows 10) the program abruptly ends as soon as I call hide() on the splash window.
(On Linux and Mac it works ok, too.)
Any ideas?

    FLTK's Fl::run() returns when there's no windows open, so make sure you show()
    the main window just before hide()ing the splash window.

    I assume you're using an Fl::add_timeout() to trigger the mainwin->show() and
    splashwin->hide(), so just be sure to do them in that order.

    You want to avoid having /no window/ open even for a short time,
    or the event loop will think the app has completed.

Reply all
Reply to author
Forward
0 new messages