POV-Ray : Newsgroups : povray.bugreports : Curious GUI bug (non-critical) : Re: Curious GUI bug (non-critical) Server Time
6 Jun 2023 21:45:17 EDT (-0400)
  Re: Curious GUI bug (non-critical)  
From: clipka
Date: 13 Jul 2017 04:08:02
Message: <59672a62$1@news.povray.org>
Am 11.07.2017 um 03:55 schrieb galbi3000:

> So, here are the steps I took (don't worry, what the bug is will be revealed
> soon!):
> 1. I opened a .POV file I had created with the plan to edit the scene.
> 2. I rendered the scene to remind myself what the scene looks like.
> 3. I closed the render window.
> 4. I decided the PovRay window was too narrow so I resized the window.
> 5. The render window re-opened on top while I was dragging the new size of the
> window!

Confirmed and examined. Not sure if a sane solution can be concocted
though; I have identified a possible approach, but am not sure about its
potential side effects, especially on older Windows versions.

The background is as follows (as far as I can make sense of it):

- When "Keep Above Main" is disabled, the render windows needs to be
made an independent window (as opposed to a child of the main window). A
side effect of this is that it won't automatically hide and show along
with the main window (e.g. when minimized to the system tray or later
re-activated from there).

- For this purpose, there's the additional option "Hide When Main
Minimized", instructing POV-Ray to "manually" hide and show the render
window whenever the main window is hidden or shown. It is implemented by
intercepting various of Windows' window handling messages that would
indicate that the main window will be re-displayed, and in that case
re-display the render window again.

- Unfortunately POV-Ray doesn't seem to manually keep track of whether
the render window /should/ be visible in the first place; so if one of
those messages in question comes in, POV-Ray just blindly re-displays
the render window (if in "manual re-display mode"). For example, if you
minimize POV-Ray to the taskbar while the render window is closed,
restoring POV-Ray from the taskbar will also restore the render window
(again, if in "manual re-display mode").

- One such cases where POV-Ray manually re-displays the render window is
when a `WM_SIZE` message comes in, which I presume /might/ come in under
some circumstances while the main window is hidden; but it also comes in
whenever you resize an already-visible main window.

I suspect that responding to `WM_SIZE` with a re-display is just a
legacy thing for older Windows versions, and that there's no longer any
need to re-display the render window in such a case; but even if that's
true, I'm not sure what old Windows version might have required it, so
just in case it was still required for XP I'm hesitant to go via that route.

Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.