- Feature Description: I would like to open a window and immediately bring it to the front with one function call.
- impact for my app: [low, mid, high, show-stopper]. high
- What is your current pain point? I have a desktop version of some of my app windows. When the users switch between those versions I would like to make sure that the new window is immediately visible and does not spawn behind the game window. Using restore and then calling bringToFront is inconsistent. Some times the bring to front function returns a success but does not actually bring to front if I try to call that function just after restoring a window.
- What do you have in mind to solve it? Can you combine the restore and bring to front logic into one call or add a flag to the restore method to optionally bring the window to the front? That would mean I only need to make one function call and the restore and bring to front methods won’t get messed up by whatever JS issue is causing this incosistency.
Hi, and thanks for the feedback.
We will discuss the matter internally, and then we’ll make a decision.
In addition, can you please tell me the game that we are talking about and the exact steps to reproduce.
I experienced issues with bring to front in MtG:A. I get an inconsistency when I restore a window and then try to bring that window to front. DM and I will send you the actual functions that I am using but more or less the order is:
- restore(name, callback)
I have tried using bringToFront in a callback to restore and also waiting for restore and then calling bringToFront but no luck so far.
Thanks for looking into this. I would so much rather just call one function and not worry about getting it to work on my end.
Also following up here that this bug is in the store version of Arena Tutor. You can reproduce it by clicking the “pop out” button in the nav bar of the main lobby window. The window will disappear and a desktop only version will appear behind the game.
@bmills95 an update: We added it to our backlog. note that the ETA is OW v0.158 (~5 weeks).
Well that is great news! I can’t wait to try it
Just ran into the same problem in Hearthstone. I am trying to open a minimized desktop window from the Windows Task bar. The desktop window shows up underneath the Game, which is wierd because one would expect Windows task bar behavior to always show the window on top.
It seems that the desktop window comes up in front of the game for only a few ms, then it seems like the game gets focus again.
I tried to fix it by listening for state changes and run bringToFront() manually after I see a desktop window going to NORMAL state, however, even this is inconsistant and the UX is terrible because you see the Desktop Window flash on top, below, then on top of the game.
For GPU acceleration reasons I really prefer to try and utilize the Desktop Windows in favor of in-game windows, but this is a real showstopper.
so i should check also if my old bug with bringToFront is fixed too, we discusse about it some times ago.
I can’t bring the cyan window on front of the red ones.
Update: we found a bug on the overwolf.windows.bringToFront() - we will fix it and update here. Thanks