Closed Guillaume227 closed 1 year ago
Hum, the initial sequence on Windows is a bit hard.
What you are seeing is:
Docking layout:
Window sizing:
Anyhow; I know it would be interesting to study this. Perhaps by hiding the window on the first frames.
I'll study that a bit later.
I am on high DPI monitor (dell XPS 15 laptop). I just unplugged the extra display I was using (which is not high DPI) and I can confirm the behavior I described also happens when I use a single (laptop) screen. I am more than happy to help/test/validate any changes you have in mind.
Hi,
This should be solved with https://github.com/pthom/hello_imgui/commit/d6af807aebc3cf9d87b2a3547402647f475b1054
The glitch is gone, that looks much nicer now. Thanks Thom for the quick turnaround (and I hope you get to do other fun stuff besides coding during your week of vacation)!
I’m on the slopes right now .
I was doing some more testing of that change and noticed an undesirable side effect : the hello_imgui
app window now forces its way to the forefront all the time (e.g. I alt-tab to some other app and the hello_imgui
app jumps back again to the front).
I think it's down to calling showWindow()
for every frame index >= 3.
I tried this locally:
if (mIdxFrame >= 3)
if (mIdxFrame == 3)
in src/hello_imgui/internal/backend_impls/abstract_runner.cpp
, around line 484
and that fixes that behavior. Any reason not to use an equality there?
Oops you are right. This needs a quick fix. Thanks ! Le 15 févr. 2023 à 14:36, Guillaume Giraud @.***> a écrit : I was doing some more testing of that change and noticed an undesirable side effect : the hello_imgui app window now forces its way to the forefront all the time (e.g. I alt-tab to some other app and the hello_imgui app jumps back again to the front). I think it's down to calling showWindow() for every frame index >= 3. Any reason not to use an equality ? if (mIdxFrame >= 3) if (mIdxFrame == 3)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Ok - I sent my simple change as a PR if that makes it easier for you: https://github.com/pthom/hello_imgui/pull/47
Upon launching my the hello_imgui powered version of my app I am seeing the main window appear in two steps, which does not look great. I am trying to understand where that's coming from. I am still on Windows.
For a split second I first see this:
That's after the first call to ShowGui() callback.
And then it becomes:
Interestingly both the position of the window on the screen and the window size change (and that can't be told from the images above). It seems that there is a first rendering pass of just the empty main window and then it picks up the dock spaces contents and somehow relocates the window (my code is not attempting any resize/change of position).