FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 393 : open() or switching applications minimizes processing
Last modified: 2006-09-12 19:31
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
WONTFIX -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
fry
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2006-09-12 19:30
as i understand it, this is specific to how windows handles "present" mode
in a sketch. switching out of it will minimize the application, the same
way as a full screen game would work--the mode is "full screen exclusive"
so it doesn't play with other applications. this is not something we can
change, nor would we want to.
however, it can be a problem if some background process tries to bring
itself forward. for that situation, dmichaelson posts:
Well, here's a solution, it's not perfect but it's not terrible. It's
working for me.
Download the cmdow utility from
http://www.commandline.co.uk/cmdow
and put cmdow.exe in your WINDOWS directory.
This is a command-line utility that manipulates windows (e.g. can prevent
your app from being closed). Since that's a potentially misused activity,
Symantec considers it malware and I had to create an exception. Probably
shouldn't have virus software running in a production environment anyway.
Then in the Processing code, include this function:
public void focusLost() {
open("cmdow java.awt.Frame /RES /ACT");
}
("java.awt.Frame" seems to be the "caption" for all full-screen exported
Processing sketches.)
That will immedately /REStore your application whenever it loses focus,
which makes it full-screen again. Also the /ACT option gives it back the
keyboard focus as well.
You might want to put a large or small delay in there, if you want to
ensure that whatever focus-stealing process is finished before you try to
restore your app. (Also, without a delay it's basically impossible to use
Ctrl-Alt-Del if you ever need to, because the task manager gets obscured
immediately.) In that case you can do
public void focusLost() {
delay(5000); // 5 second delay
open("cmdow java.awt.Frame /RES /ACT");
}
original discussion can be found here:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1156614434