This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 238446 - Input cursor in editor window not active
Summary: Input cursor in editor window not active
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Stanislav Aubrecht
Keywords: FOCUS
Depends on:
Reported: 2013-11-15 22:14 UTC by hupfdule
Modified: 2015-08-05 07:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Video of the missing input cursor (827.55 KB, video/x-msvideo)
2013-11-15 22:14 UTC, hupfdule

Note You need to log in before you can comment on or make changes to this bug.
Description hupfdule 2013-11-15 22:14:21 UTC
Created attachment 142248 [details]
Video of the missing input cursor

Since version 7.4 of netbeans I have an issue with the cursor focus in the editor window. When the netbeans window gets the focus from the OS, I am able to click into the editor window with the mouse (the selected line is correctly highlighted),  but the input cursor is missing. Typing any characters is not possible. I have to click into the menubar first and then close that menu again to get an input cursor.

I have attached a video that shows the problem. It starts with a correct input cursor. After typing and deleting some characters, I switch to another application (xcalc). After that I switch back to netbeans. You can see that the editor reacts on the mouseclicks, but no input cursor is visible (my typing of characters does nothing). I then select the menu bar and close it againg and the input cursor comes back.

I never had this behaviour with any other version of netbeans.
I am working under Debian Linux. The problem seems unrelated to the window manager. I have tried it with e16 and icewm. The problem remains the same.
Comment 1 hupfdule 2013-11-26 13:23:28 UTC
I found out, that this is an issue with the java version. Java 6 works fine, Java 7 leads to the mentioned problems. So this applies to older releases of netbeans, too (at least 7.3, which I have tried).
It first looked like a 7.4-specific problem, since I am running 7.3 with Java 6, but 7.4 required Java 7.
Comment 2 David Strupl 2013-12-06 19:11:29 UTC

please tell us the exact version of Java that this happens with - is it JDK or OpenJDK? The content of the about dialog or the header from the messages.log file would be the best. I am assigning to the window system as this seems related to focus and not specific to the editor.

Comment 3 Stanislav Aubrecht 2013-12-09 11:06:07 UTC
Please provide JDK, OS and NetBeans version info and reopen, thanks.
Comment 4 hupfdule 2013-12-09 11:52:55 UTC
Hi David,

here is the header of the messages.log file:

>System Info:
  Product Version         = NetBeans IDE 7.4 (Build 201310111528) (#6523d6792981)
  Operating System        = Linux version 3.2.0-4-amd64 running on amd64
  Java; VM; Vendor        = 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_25-b15

BUT it _does_ seem to be related to the WindowManager. I now tried it with e17 and the problem does not seem to exist. So there are two components that influence the problem: The java version and the windowmanager.

Here is a link to a bugreport on icewm. It contains some links to other pages describing the problem. It seems to be a bug in the JDK.

Still I do reopen this issue, in case netbeans can implement some workaround. 

@Stanislav: Would you mind reading my report? I have provided that information. I did it even in detail after I found out that it doesn't happen with Java 6.
Comment 5 hupfdule 2013-12-09 11:53:52 UTC
Argh, I forgot the link:
Comment 6 Stanislav Aubrecht 2013-12-09 14:41:13 UTC
If my understanding is correct then only a handful of window manager is affected by this bug.

Reporter, can you please try the latest build JDK 8 where it should be fixed already?

As for a possible workaround in NetBeans - I'd be very careful here. The focus handling is very fragile and forcing input focus could break behavior on other platforms.
I suppose an extra NetBeans module that listens to 'window activated' events and calls requestFocusInWindow() or requestFocus() might help. But it's not something we'd want in standard distribution.
Comment 7 Stanislav Aubrecht 2014-01-28 09:44:44 UTC
Waiting for response from the reporter...
Comment 8 jimux 2014-08-21 18:52:21 UTC
I am experiencing this problem as well.

Netbeans 8.0 (Build 201403101706)
OS: OSX 10.9.4
JDKs tried: 1.7.0_67 1.8.0_11

I can recover the cursor by opening a subwindow (like the About Netbeans window) and closing it.
Comment 9 riccardoghiglianovich 2015-08-05 07:06:27 UTC
The issue is still alive and kicking and is present also on Apple OSX

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Mac OS X version 10.10.4 running on x86_64; UTF-8; it_IT (nb)