General :  K-Meleon Forum
General discussion about K-Meleon. 
New window on top?
Posted by: torbetron
Date: June 18, 2011 04:56AM

When I used Firefox, I would have multiple windows open, each with possibly multiple tabs. The fastest way to open a new window, especially when I was doing something else (non browser-related), was to start Firefox window by way of the Start Menu of Windows. This was faster than going to one of my already open Firefox windows then going File -> Open New Window.

I can do the same thing with K-Meleon, but the new window is always "underneath" the non browser-related thing I'm working on. Is there a way to have it be on top? That is, have it be the active window in Windows.

Thanks!

Options: ReplyQuote
Re: New window on top?
Posted by: siria
Date: June 18, 2011 11:17PM

Weird...
If you click F2 and on the right side on "window diversion", there's a checkbox to "open diverted window in background". You don't happen to have checked that?? Otherwise I'm out of ideas.

Options: ReplyQuote
Re: New window on top?
Posted by: deadlock
Date: June 18, 2011 11:50PM

Quote
siria
Weird...

@siria
Does 'Weird...' mean, you could not reproduce it?

I guess 'open diverted window in background' is
used for current instance of application.

If opening KM from explorer, while it is already
opened in background, the new window is being created
behind the explorer window.

If there is no other switch in Preferences,
here is a fix for next version:

MfcEmbed.cpp
===
// if another instance is already running, pass it our command line paramaters,
// and ask it to open a new window
// eventually, we should handle this through DDE
if (m_bAlreadyRunning) {
// find the hidden window
if (HWND hwndPrev = ::FindWindowEx(NULL, NULL, HIDDEN_WINDOW_CLASS, NULL) ) {
// deadlock: foreground if alread running
SetForegroundWindow(hwndPrev);
===

Options: ReplyQuote
Re: New window on top?
Posted by: JamesD
Date: June 19, 2011 03:08AM

I was trying to test something for this thread and I ran into a problem.
I created a new shortcut to KM and put it on the taskbar. I added the "-new" to the command line. When I had this thread open in KM and also MS Outlook open also, I tried to open a new KM. I got a message about the profile being in use. I then added -profileDir "path" to my shortcut and that did open a new KM. The second KM was on top but it was just like a brand new install because it created a new default profile. I am using KM 1.6.0 beta2 on Win 7 (32 bit).

In previous threads about using the command line option -new, I don't remember anything about needing -profileDir "path". Is this a 1.6 thing or a Win 7 thing?

Options: ReplyQuote
Re: New window on top?
Posted by: deadlock
Date: June 19, 2011 04:53AM

@JamesD

If a previous instance of KM is running,
the new instance will open a new window
of the current profile.

If you want two or more different profiles at the same time,
use the profile switch -P<profile> in combination with the -new switch.

You can use 4 Profiles at once,
if you create 4 Profiles with Names
(default, withFlash, noPics, onlyBank)
and creat 4 shortcuts to K-Meleon.exe with
these switches:

\k-meleon.exe -Pdefault -new
\k-meleon.exe -PwithFlash -new
\k-meleon.exe -PnoPics -new
\k-meleon.exe -PonlyBank -new

Options: ReplyQuote
Re: New window on top?
Posted by: siria
Date: June 19, 2011 05:52AM

... or set the profiles to "Ask at startup", then no fix profile is needed in the commandline ;-)
Ah yes, and neither needed if the link goes to another version of KM (154/1.6), if one of them is portable, using another profile anyway.



Edited 1 time(s). Last edit at 06/19/2011 05:58AM by siria.

Options: ReplyQuote
Re: New window on top?
Posted by: JamesD
Date: June 19, 2011 07:12PM

Quote
Deadlock
If a previous instance of KM is running,
the new instance will open a new window
of the current profile.

That is what I was expecting but what I get is a message which says "The selected profile can't be loaded. It's already in use or the profile folder is not accessible." If I click on the "OK" there, I get the select a profile screen.

@ siria

When I put a check in "Ask at startup" and I select the default profile I am right back at the error message that I just described above.

I don't have any special security on my Win 7. I just run with all rights.

Options: ReplyQuote
Re: New window on top?
Posted by: siria
Date: June 19, 2011 07:23PM

That has always been that way James, if you're running two K-Meleons at the same moment and independant from each other, using that "-new" switch, they must not share the very same profile. That works one after the other, but not simultaneously. That's also written somewhere (wiki?), and guess that could quite mess up a profile, if it's used simultaneously yet separated, one process not knowing what the other does.
I think deadlock meant if you click a K-Meleon link without "-new", then it uses the same profile...



Edited 2 time(s). Last edit at 06/19/2011 07:29PM by siria.

Options: ReplyQuote
Re: New window on top?
Posted by: JamesD
Date: June 19, 2011 08:13PM

@ siria

That makes sense. So to get back to torbetron 's question, I think you cannot get the second window to have focus if another application already has focus. A second window will have focus only if it is "new" and uses another profile.

Options: ReplyQuote
Re: New window on top?
Posted by: deadlock
Date: June 19, 2011 11:48PM

Quote
JamesD
Quote
Deadlock
If a previous instance of KM is running,
the new instance will open a new window
of the current profile.

That is what I was expecting but what I get is a message which says 'The selected profile can't be loaded. It's already in use or the profile folder is not accessible.' If I click on the 'OK' there, I get the select a profile screen.

What did you expect? Any suggestions?
The optional -new requests a different profile.

I've opened bugid=1321 since there is no other option to fix it.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.