Using Windows 7, java 6. jedit 4.4.2 or daily 2012-03-08, the same effect.
When I switch from jedit to a command prompt (or whatever) and try to open a file
in jedit like:
java -jar c:\program_files\jedit\jedit.jar -reuseview C:\temp\1\file.txt
I experience different kinds of focus problems depending on the windows and editor
state:
1. jedit is maximized and an old file (which was active in jedit at this moment) is
being opened:
no cursor, jedit window not focused (the taskbar blinks), keyboard not working
2. jedit is maximized and a new file (which was not opened in jedit at this moment)
is being opened:
cursor blinks, jedit window not focused (the taskbar blinks), keyboard not working
3. jedit is minimized and an old file is being opened
no cursor, jedit window focused, keyboard not working; goto next text area make all
ok (fired as a keyboard shortcut)
4. jedit is minimized and a new file is being opened
all ok
It is problematic as one cannot use the keyboard for opening new files from outside,
but always has to click the editor with mouse to get it working.
Probably there are 2 different bugs here. 1-2 platform dependent, 3-4 maybe not. But
let's concentrate on points 1-2 where the jedit application is not focused at all.
In fact the command prompt window still has the focus, as it can be detected through
Alt-Space, Properties. When the jedit application is correctly activated (3-4), one
has an easy workaround with a keyboard shortcut. For points 1-2 there is also a workaround
- minimize jedit before going to another application.
I did a quick look at EditServer.handleClient. There are operations there that may
be responsible for the problems, but I stopped investigating at the moment. However
having the above steps described may help in further work.
Submitted | jarekczek - 2012-03-09 09:11:52 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | Windows Specific |
Status | open | Group | None |
Resolution | wont-fix |
2012-03-09 13:31:48 jarekczek |
I spent more time on it and that's how it works on Windows 7. OS prevents old applications
(contrary to new application windows) to steal the focus. Right, I had this problem
with excel too, when programatically generated worksheet didn't appear, only started
flashing on taskbar. So when the user doesn't want this safety feature they can switch
it off through the registry. Google for ForegroundLockTimeout, it's in registry under
HKCU\Control Panel\Desktop. Requires windows restart. I am happy with the setting
as it solves both my excel and jedit problems.
|
---|---|
2012-03-09 13:31:48 jarekczek |
- **status**: open --> pending-wont-fix |
2012-03-09 13:45:40 jarekczek |
Well, actually I haven't discovered nothing new. There is a switch I was dreaming
about. It's
|
2012-03-09 13:45:40 jarekczek |
- **status**: pending-wont-fix --> open-wont-fix |
2013-10-07 22:14:27 ezust |
- **labels**: --> Windows Specific |