Java AWT/Swing apps losts focus in some situations

Bug #174281 reported by Tomáš Virtus
2
Affects Status Importance Assigned to Milestone
sun-java6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

First I encoutered this behavior in NetBeans (5.5, 6.0), then in iReport and now when I tried to use IntelliJ Idea 7.

Few steps how to reproduce bug on my laptop:
1. Open IntelliJ Idea/NetBeans/...
2. Create some project, add some source file and edit it
3. Open some dialog window (database access, some settings, ...)
4. Now try to write to editor. All keys goes to /dev/null (when I played with windows I somehow got focus back).

I'm forced to edit all my Java work in Eclipse, where everything works well, so it seems it has something to do with Swing/AWT.

When I first encountered this in NetBeans I created a bug where I reproduced it (maybe) more in detail, but it seems they ignored me :(
http://www.netbeans.org/issues/show_bug.cgi?id=32755

Revision history for this message
Tomáš Virtus (virtustom) wrote :

Sorry.

My java is:
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

(same in 1.6.0_02)

I'm running Gutsy.

Revision history for this message
Tomáš Virtus (virtustom) wrote :

I found following informations about it:

http://forums.java.net/jive/thread.jspa?messageID=189281
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6568693

However on IRC #ubuntu I got wind that many peoples uses NetBeans/IntelliJ IDEA on Ubuntu so I think it isn't a bug in Java 6. But I'm sure I didn't do any hack on system.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10?

Changed in sun-java6:
status: New → Incomplete
Revision history for this message
Tomáš Virtus (virtustom) wrote :

Hi.

Sorry, I forgot to update. I think it has something to do with AWT_TOOLKIT variable. In past, it was recommended (I don't know if it still applies, I don't use compiz anymore) to set this variable to MToolkit due to Compiz issues with Java gui apps. I forgot this variable in /etc/environment. When I tried to set this variable to XToolkit or leave it unset (XToolkit is default on Linux), problems with keyboard locking in java apps disapeared.

Little info about toolkits: http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html
Java bug post: http://bugs.sun.com/view_bug.do?bug_id=6506617

Michael Nagel (nailor)
Changed in sun-java6:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.