Page 1 of 1
Dialog box opens up behind systemWindow stack
Posted: Fri Jun 01, 2018 5:44 am
by raugert
Note: I changed the title of the post for better clarity... I hope it ok..
I use the "systemWindow" command to keep my stack on top of other applications. When I open a dialog box like "answer file" or answer "yes" "no" to quit, the dialog box appears behind my application window. So to bring the dialog box to the front, I temporarily issue a systemWindow False command to my stack, but I get a "screen flash" when doing this. Is there another way to bring the dialog boxes to the front and leave the systemWindow true so I don't get the screen flash ? This only happens on Windows platform and not on Mac.
Code: Select all
case "Quit"
lock screen
if the hilite of button "Always On Top" is true then set the systemwindow of stack "vMIx Panel Builder" to false
answer "Do you really want to quit?" with "No" or "Yes"
if it is "Yes" then
send "quitMyProject" to stack "myApp" in 0 millisecs
end if
set the systemwindow of stack "myAppr" to hilite of button "Always On Top"
unlock screen
break
Re: set 'systemWindow' flashes when it changes state
Posted: Fri Jun 01, 2018 6:46 pm
by richmond62
I wonder why your dialog box is appearing behind the main stack:
is it a home-made dialog rather than the standard one built into LiveCode?
Re: set 'systemWindow' flashes when it changes state
Posted: Fri Jun 01, 2018 8:44 pm
by raugert
No, it's the standard Livecode dialog box. It only happens when I set systemWindow of my stack to true. Otherwise it appears in the front as normal.
Re: Dialog box opens up behind systemWindow stack
Posted: Sat Jun 02, 2018 6:03 pm
by jacque
A system window floats over everything else so it's to be expected that a dialog will appear behind it. When you change a window style, LC must destroy the old window and create a new one, which is why you see the flash. There is no way to ask the OS to change the style of an existing window, it has to be created new. A lockscreen won't help because screen locks only apply to the current window, and that one is about to be destroyed.
The only workaround I can see is to use a group in the system stack instead of a dialog. In other words, do everything inside the system window.
Re: Dialog box opens up behind systemWindow stack
Posted: Sun Jun 03, 2018 2:19 pm
by raugert
Thank-you jacque,
That is a great explanation. I could easily create a group for a simple yes/no dialog, but when I ‘open or save’ a file, I use the “answer file” dialog. That would be more complicated to create from scratch. I think I’ll live with the flashing in that case..
Thanks for your help,
Richard
Re: Dialog box opens up behind systemWindow stack
Posted: Sun Jun 03, 2018 2:44 pm
by jmburnod
Hi Richard,
That would be more complicated to create from scratch
Yes, if you want save to/ open from anyplace.
You may decide for one destination/source folder in documents folder or in the folder of your app to save/open file without answer/ask file.
Best regards
Jean-Marc
Re: Dialog box opens up behind systemWindow stack
Posted: Mon Apr 27, 2020 8:42 pm
by karmacomposer
I am having the same problem.
In Windows 10, everything works perfectly in the editor. However, after building, ask and answer dialogs are hidden or behind other items in the stack.
How can I fix this? I need answer and ask dialogs to appear like they should.
I can't seem to find anything in the build options that would fix this.
Thank you for any help.
Mike
Re: Dialog box opens up behind systemWindow stack
Posted: Tue Apr 28, 2020 4:16 pm
by jacque
Nothing has changed since the first responses. A system window floats above everything else, that's its purpose. Try the suggestion above, setting it to false before showing a dialog.
Re: Dialog box opens up behind systemWindow stack
Posted: Tue Apr 28, 2020 6:14 pm
by FourthWorld
Are there examples of apps from major vendors in which systemWindow-level windows are in front of dialogs opened from such a window?
True, systemWindow is designed to have a window above all others.
But modal dialogs are also designed to be above all others. And given their role, it seems reasonable that a modal dialog opened from any window - even a palette, even with systemWindow true - would be in front of the window invoking it.
I'd flag this as a bug.
Re: Dialog box opens up behind systemWindow stack
Posted: Tue Mar 25, 2025 10:19 am
by Xero
I know this is a thread from ages ago, but my Livecode community has just started doing this too.
I haven't changed anything anywhere (that I am aware of) and whenever I close the stack in the IDE, the "do you want to save" dialogue appears behind the stack, and I can't see it (and consequently click on it). I go to the Windows tray and click on the window for the stack, and then the dialogue appears on top of the stack, and I can close it down. This is the same for the dialogues I use for "answer" commands.
Annoying, but can be worked around with a few clicks.
This is the case for all stacks, old and new that never did this before.
Was this bug dealt with?
I wonder why it has just started...
XdM
Re: Dialog box opens up behind systemWindow stack
Posted: Tue Mar 25, 2025 5:53 pm
by Klaus
If nobody will report this here:
https://quality.livecode.com then this will never get fixed!

Re: Dialog box opens up behind systemWindow stack
Posted: Wed Mar 26, 2025 6:12 pm
by bamakojeff
I believe that it's a problem with the backdrop (View->Backdrop) on Windows. When you bring up a modal dialog box (one that is meant to stay on top), they appear
behind the backdrop. Hence you can't see them. But you can bring them to the foreground by clicking on the Livecode icons in the dock, or clicking anywhere on the backdrop, or clicking on any of the Livecode titlebars.
If you turn off your backdrop, then the modal dialog boxes appear in the foreground like they should.
I just reported it:
https://quality.livecode.com/show_bug.cgi?id=24673
Re: Dialog box opens up behind systemWindow stack
Posted: Wed Mar 26, 2025 6:22 pm
by Klaus
Hm, noone mentioned BACKDROP here so far!?
Problems are with a SYSTEMWINDOW stack which covers the dialogs.
There are already some reports about backdrop problems:
https://quality.livecode.com/buglist.cg ... _id=112862