[fltk/fltk] If app appears on non-active screen, window resizes (#259)
Webb Hinton
Jul 18, 2021
Moved this issue from fltk-rs/fltk-rs#784 to here, as it seems to be purely related to C FLTK.
When I launch my FLTK app, sometimes the window automatically resizes. This behavior only occurs when the cursor is not on the same screen as the app when the app window appears. That is, the app launches on the "non-active" window.
This resizing can also sometimes cause widgets to resize strangely.
I'm using the same monitor setup as when we were working through the gidplus issue. (launching the app on the active screen in VSCode, then having the app appear on the "non active" monitor). fltk-rs/fltk-rs#740. Monitor 0 is 1920x1080 and monitor 1 is 4k.
Os is Win10x64
#include<FL/Fl.H>
#include<FL/Fl_Button.H>
#include<FL/Fl_Window.H>intmain() {
auto win = new Fl_Window(500, 500, "Counter");
auto but1 = new Fl_Button(100, 100, 100, 100, "Dummy");
auto but2 = new Fl_Box(200, 100, 100, 100, "Dummy");
but1->tooltip("Tooltip..");
// auto but3 = new FL_Button
win->end();
win->show();
Fl::lock();
returnFl::run();
}
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.