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 253222 - Netbeans does not close with ALT-F4 on Linux Gnome
Summary: Netbeans does not close with ALT-F4 on Linux Gnome
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-28 08:07 UTC by everflux
Modified: 2015-10-22 20:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screencast showing missing input focus (2.78 MB, video/webm)
2015-08-12 11:53 UTC, everflux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2015-06-28 08:07:53 UTC
In the past I could close Netbeans with alt-f4. This is no longer working in the dev build, 8.0.2 works.
Clicking on the window close icon works, though.
Comment 1 everflux 2015-07-04 15:30:54 UTC
Other keyboard interactions with the Netbeans window do not work either, f.e. moving it to a different workspace.
It seems that the window does not receive focus. (I have focus follows mouse, not click to focus configured in the window environemnt.)
This could explain other annoying situations that after a popup dialog (like, f.e. git authentication dialog) the editor does not receive focus, but I have to ctrl-0 to get an active cursor.
Comment 2 everflux 2015-07-31 20:27:18 UTC
This is still happening with the latest beta build (07-30).
I have more details to add:
when window focus mode is set to 'click' the problems seems to be masqueraded (work around).
Focus mode 'sloppy' or 'mouse' forces the user to change to a different application and then back to netbeans in order to get a focus on the window.

When the window has focus the shortcuts work as expected.
Comment 3 Jiri Kovalsky 2015-08-11 16:46:37 UTC
Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Updates: Updates available
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/8.1beta
Cache directory: /home/cesilko/.cache/netbeans/8.1beta

Works fine for me.
Comment 4 everflux 2015-08-11 16:48:25 UTC
Note that you need to have the mouse focus behaviour set to 'sloppy', not 'click' to focus. (This is a Gnome/window manager setting)
Comment 5 everflux 2015-08-12 07:52:51 UTC
Ok this is strange, I can not reproduce it myself.

I will investigate if it is related to a multi monitor setup on my other machine and reopen if I have steps to reproduce.
Comment 6 everflux 2015-08-12 11:53:33 UTC
Created attachment 155289 [details]
screencast showing missing input focus

This seems to be a problem that is not related to 8.1 since I could reproduce it with 8.0.2 as well.
The actual circumstances are not very clear to me, but to reproduce it the following conditions seem to be required
- current Gnome (Ubuntu 15.04)
- mouse focus mode 'sloppy'
- another window must be open, not just netbeans

You can see in the screen recording that the netbeans window does not receive input focus until the focus is switched to another window an then back.
This prevents ALT-F4 input, but not Netbeans shortcuts like ctrl-O - my guess it is because ALT-F4 is the window manager, not Netbeans.
This would not be so bad if the focus would not sometimes get lost from the editor window as well, then CTRL-O does not work until clicking inside the editor, forcing a switch to the mouse.
Comment 7 everflux 2015-08-26 19:28:57 UTC
Results of some research:

- might be related https://bugs.openjdk.java.net/browse/JDK-8058197
- Others have problems with focus, too https://youtrack.jetbrains.com/issue/IDEA-112015
- this fixes the focus issue for the window, but menus collapse immediately and right-click popup menus don't receive mouse focus

_JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING

Workaround is not to use 'focus follows mouse' but 'click to focus' in the window manager.
Comment 8 everflux 2015-10-22 20:22:32 UTC
This seems to be a Gnome problem, I could not reproduce it with Gnome 3.16 / Ubuntu 15.10