|
|
On 10 Sep 2020, at 20:32, Rodolfo Borges wrote:
>
> Forgot to mention that this was on Linux.
>
> I just tested it on a Mac, and there was no bug.
> On Thursday, September 10, 2020 at 3:53:22 PM UTC-3 Rodolfo Borges wrote:
> First, the overall situation:
>
> My program main screen uses SDL+OpenGL.
> There is a FLTK window at the start that shows a project list, where you can select a project and open the main window. But you can bypass this screen and open the main window directly if you pass the project name on the command line.
> Once in the main window, it can eventually call some dialogs that are FLTK windows.
>
> And here's where it gets weird:
>
> The moment I put an Fl_Input widget on one of those dialogs that are called from the SDL window, the program crashes the moment the cursor gets inside the Fl_Input widget.
> gdb tells me that it crashes on the FLTK function that changes the cursor.
>
> I'm using FLTK 1.4 master branch, but I tested it with 1.3.5 too, with the same results.
>
> After fighting this bug for two days, I noticed that if I introduce an Fl_Input widget on the first screen *before* the SDL window opens, then it works, and the FLTK dialog that opens after the SDL window works too.
> And this led me to the following workaround:
>
> static void ugly_HACK_workaround_fltk_setcursor_bug()
> {
> Fl_Window w(10, 10, 20, 20);
> w.show();
> w.cursor (FL_CURSOR_INSERT);
> w.hide();
> }
>
> I just call this function at the very start of the program, and the bug is fixed.
I think you are going to have to show us more context - perhaps even a minimal, compileable, example that exhibits that fault.
Based on what you have shown, I don’t think I even understand what it is that you are asking here...
--
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/0E49DB4F-01A9-4EB9-B9D2-D3C778ABF1D5%40gmail.com.
[ Direct Link to Message ] | |
|
| |