Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show a window in the fastest way possible?

I have 3 main windows in my Xulrunner app that will be accessed very frequently. The application is running on a very slow system, so before the window shows up, I see a fully black box, and then the window appears, filling that black area.

As I'm in an embedded system, and the "minimize" animation is not shown, I did the window's minimize instead of closing, but it's still not showing up as fast as I wanted.

Is there a way to let a window load in a buffer so that it appears more quickly? Or, how can I display this window in the fastest way possible?

--update

By the way, the windows have nothing heavy. One is a popup window with a "Loading" label, and I it still takes much time (about a second) to show up:

<?xml version="1.0" encoding="UTF-8"?>

<!-- Style -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window id="loadingWindow" hidechrome="true"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

    <vbox pack="center" align="center">
        <label id="textLabel">Loading...</label>
    </vbox>

</window>

I open it with:

openDialog("chrome://myapp/content/loading.xul", 'Loading', 'chrome, popup, centerscreen');
like image 642
The Student Avatar asked May 02 '11 16:05

The Student


People also ask

What is the fastest way to hide all Windows?

If your keyboard has a Windows key (and most current keyboards do), you can press the Windows key and the M key simultaneously to minimize all the currently open windows on your desktop.

How do I make a hidden window visible?

The easiest way to get back a hidden window is to just right-click on the Taskbar and select one of the window arrangement settings, like “Cascade windows” or “Show windows stacked.”

How do you open Windows quickly?

Press the Windows key and the Pause/Break key at the same time. On your desktop, or in File Explorer, right-click This PC (in Windows 10) or My Computer (previous versions of Windows).


2 Answers

can you do native code?
createHiddenWindow()

alternatively, you could toy with creating a tiny, transparent window with the chrome hidden

It's not complete but for starters:

<?xml version="1.0"?>
<!--<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>-->
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="1px" height="1px" hidechrome="true" style="max-width:1px; max-height:1px; opacity:0">

<description>blar</description>

</window>
like image 119
pc1oad1etter Avatar answered Oct 10 '22 01:10

pc1oad1etter


can't you simply swap out all elements from the main window and replace them with the elements of the window you want to show? or, probably better yet, doing something similar with a deck?

like image 32
CAFxX Avatar answered Oct 10 '22 02:10

CAFxX