Bug 227754 - Mouse focus is not under the mouse pointer in the MATE desktop
Mouse focus is not under the mouse pointer in the MATE desktop
Status: REOPENED
Product: platform
Classification: Unclassified
Component: Window System
8.0.1
PC Linux
: P3 with 3 votes (vote)
: 7.4
Assigned To: Stanislav Aubrecht
issues@platform
73patch2-verified
:
: 234739 239293 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-21 07:23 UTC by Martin Fousek
Modified: 2017-07-06 19:01 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
extending of the #198639 fix for mate desktop (852 bytes, patch)
2013-03-21 07:23 UTC, Martin Fousek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2013-03-21 07:23:16 UTC
Created attachment 132885 [details]
extending of the #198639 fix for mate desktop

Product Version         = NetBeans IDE Dev (Build 20130321-b1c38308cddd) 
Operating System        = Linux version 3.2.0-27-generic running on amd64
Java; VM; Vendor        = 1.6.0_39; Java HotSpot(TM) 64-Bit Server VM 20.14-b01;

Like in the issue #198639. The mouse cursor doesn't correspond with the mouse focus in NetBeans menus in the MATE desktop. I went thru several forums and the issue looks pretty annoying for more users including me who would like to switch to this desktop (as the one of the most usable gnome2 fork). I checked the change by myself it worked well to me.

Steps for reproducing are simple:
1, start NetBeans IDE on with the MATE desktop
2, maximalize the window
-> mouse focus is moved :/

Stando please can I integrate attached change?

Marian I would like to include it into the patch2 since the change is minimal as well as risks and the benefit is huge for MATE users.
Comment 1 Stanislav Aubrecht 2013-03-21 09:11:42 UTC
(In reply to comment #0)

> 
> Stando please can I integrate attached change?

If the fix actually works then sure, go ahead.
Comment 2 Martin Fousek 2013-03-21 12:59:50 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Stando please can I integrate attached change?
> 
> If the fix actually works then sure, go ahead.

Yeah, it worked well - I felt comfort of maximized window again. :) Thanks.
web-main #2ffc94e68f0f
Comment 3 Quality Engineering 2013-03-23 01:55:51 UTC
Integrated into 'main-golden', will be available in build *201303222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2ffc94e68f0f
User: Martin Fousek <marfous@netbeans.org>
Log: #227754 - Mouse focus is not under the mouse pointer in the MATE desktop
Comment 4 Vladimir Riha 2013-05-02 07:42:37 UTC
Verified, focus seems to be OK with Mate 1.6


Product Version: NetBeans IDE Dev (Build 201304292301)
Updates: Updates available
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-40-generic-pae running on i386; UTF-8; en_US (nb)
Comment 5 Quality Engineering 2013-05-05 00:25:58 UTC
Integrated into 'releases', will be available in build *201305042200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/7e78e73cf8e6
User: Martin Fousek <marfous@netbeans.org>
Log: #227754 - Mouse focus is not under the mouse pointer in the MATE desktop (transplanted #2ffc94e68f0f)
Comment 6 Vladimir Riha 2013-05-10 10:11:30 UTC
patch2 verified

Product Version: NetBeans IDE 7.3.1 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-41-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 johnslegers 2013-08-16 17:28:37 UTC
I recently installed Linux Mint 15 (MATE). I then downloaded and installed the latest official release of Netbeans.

I noticed the following problems :

* The file tree do not always get automaticly refreshed when new files are added outside of Netbeans, even though it is configured to do so. This problem can be bypassed when manually refreshing the file tree.

* My menus work fine for a while. Then, their behavior breaks :

** The menu bar menus automatically close whenever I release my mouse button. I do not have enough time to click on anything. Holding my mouse button does allow me to go over the menu, but the menu closing again is the only think that happens when I release it on top of a mouse button. Thus, these menus have become inaccessible.

** there's a significant X and Y offset (>100 px X, >50px Y) between the position of my cursor and the selected menu whenever I'm using a right-click menu. This does not render these menus inaccessible, but it does make them pretty hard to use.



After reading this issue, I downloaded and installed build 201308141142 under the assumption that at least the menu bugs would have been fixed. Unfortunately, the exact same thing happened.
Comment 8 Stanislav Aubrecht 2013-08-16 17:32:46 UTC
(In reply to johnslegers from comment #7)

> 
> After reading this issue, I downloaded and installed build 201308141142
> under the assumption that at least the menu bugs would have been fixed.
> Unfortunately, the exact same thing happened.

Please provide your JDK version info, thanks.
Comment 9 johnslegers 2013-08-16 17:51:15 UTC
JDK details :
* java version "1.7.0_25"
* Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
* Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)


Anyway, I only just figured out that the problem with the menu bars is the same problem I'm having with the right bar menus.


Thus, I'll correct my bug report as follows :

* The file tree do not always get automaticly refreshed when new files are added outside of Netbeans, even though it is configured to do so. This problem can be bypassed when manually refreshing the file tree.

* My menus work fine for a while. After some time, their behavior breaks : there's a significant X and Y offset (>100 px X, >50px Y) between the position of my cursor and the selected menu whenever I'm using either a right-click menu or a menu bar menu. This does not render these menus inaccessible, but it does make them pretty hard to use.


The same thing happened when I used the official release and when I used build 201308141142.
Comment 10 Martin Fousek 2013-08-19 08:09:50 UTC
Sorry I have to reset to default assignee since the original issue was only about the extending available hack for the MATE desktop environment and I don't know this area enought to be able to fix it for another DE.

Also it looks to me like another problem and I wonder wheter it shouldn't be reported as a new issue only against the Mint15 since all previous versions of Mint works well with NetBeans now.
Comment 11 Stanislav Aubrecht 2013-08-22 13:48:53 UTC
*** Bug 234739 has been marked as a duplicate of this bug. ***
Comment 12 Lope 2013-11-08 10:19:23 UTC
Please vote for this bug guys.

PS I haven't tried Netbeans 7.4 yet.

Basically if the Netbeans window is maximized, netbeans is very confused about where the mouse cursor is. It thinks the cursor is up and to the left by about 100 pixels.
Comment 13 Lope 2013-11-08 12:33:17 UTC
Maximizing Netbeans 7.4 is still broken in Mate Desktop x64 1.6.0. (as above)
Comment 14 michael_n 2013-11-18 03:47:04 UTC
Verified issue still exists in 7.4 development build, mate 1.6 (linux mint 15), latest jdk7.

To reproduce: start netbeans, maximize, click on "Tools", and move mouse down menu to click on menu item; another menu to the left opens.  Alternatively, "Tools" menu won't stay open after clicking. (Due to "mouse up" event moving off the menu?)

Work-around is to not maximize the window (as previously described), and rather just make the un-maximized window very large.


Product Version: NetBeans IDE Dev (Build 201311070001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.8.0-33-generic running on amd64; UTF-8; en_US (nb)

Mate 1.6.0, LinuxMint Releaes 15 (olivia)
Comment 15 michael_n 2013-11-18 03:59:36 UTC
(Continuing from my previous comment)  A comment in bug #198639 ( https://netbeans.org/bugzilla/show_bug.cgi?id=198639 ) suggested using OpenJDK as a work-around, but I see the exact same (incorrect) menu behavior in both the Oracle (Sun) JDK 1.7 and OpenJDK 1.7

The issue of "menu not staying open after clicking it", and the "incorrect location of the mouse pointer after clicking menu" both seem to be the same issue. (Note: if the mouse stays pressed down after clicking the menu, and the mouse is moved down the menu, the incorrect menu still opens up, so I don't think this is related to a bad mouse location after "mouse up" event.)


Product Version: NetBeans IDE Dev (Build 201311070001)
Java: 1.7.0_25; OpenJDK 64-Bit Server VM 23.7-b01
Runtime: OpenJDK Runtime Environment 1.7.0_25-b30
System: Linux version 3.8.0-33-generic running on amd64; UTF-8; en_US (nb)

Mate 1.6.0 / Linux Mint 15
Comment 16 Martin Fousek 2013-11-18 06:44:03 UTC
That strange that it's working well to me with on the similar environment:
Mint 15, Mate 1.6.0, jdk 1.7.0_u25

Which value in the DESKTOP_SESSION system property do you have?
echo $DESKTOP_SESSION
Comment 17 michael_n 2013-11-18 11:12:03 UTC
Update: reproducing this is interesting. I tried to once again reproduce the problem -- without reboot or changing any other settings -- and it did *not* happen. (After maximizing netbeans, the menus were working as expected). Restarting netbeans, using different jdk's, nothing could reproduce the problem. 

So, I then deleted ~/.netbeans and ~/.nbi and the netbeans installation, and re-installed netbeans-trunk-nightly-201311070001-linux.sh  (full development "all" nightly trunk, de-selecting only PHP & JavaME during install, no plugins, no updates.)

Then, the problem *did* immediately again occur, reproducibly (maximize, click on menu "Window", hold down the mouse & slide down menu; then, the menu to the left ("Team or "Tools") incorrectly opens up instead of the "Window" menu.)


The current setting of DESKTOP_SESSION:

$ echo $DESKTOP_SESSION 
default

However, setting to gnome actually *does* seem to resolve the issue:

$ export DESKTOP_SESSION=gnome
Comment 18 Martin Fousek 2013-11-18 12:22:45 UTC
(In reply to michael_n from comment #17)
> Update: reproducing this is interesting. I tried to once again reproduce the
> problem -- without reboot or changing any other settings -- and it did *not*
> happen. (After maximizing netbeans, the menus were working as expected).
> Restarting netbeans, using different jdk's, nothing could reproduce the
> problem. 
> 
> So, I then deleted ~/.netbeans and ~/.nbi and the netbeans installation, and
> re-installed netbeans-trunk-nightly-201311070001-linux.sh  (full development
> "all" nightly trunk, de-selecting only PHP & JavaME during install, no
> plugins, no updates.)
> 
> Then, the problem *did* immediately again occur, reproducibly (maximize,
> click on menu "Window", hold down the mouse & slide down menu; then, the
> menu to the left ("Team or "Tools") incorrectly opens up instead of the
> "Window" menu.)

I believe that you are still facing the issue because it's actually JDK bug which is only workarounded in NetBeans. So userdir deletion will not work here.

> $ echo $DESKTOP_SESSION 
> default

That's the issue, workaround for this issue works with the "gnome-shell", "gnome" and "mate" DESKTOP_SESSIONs. The easiest workaround is to set your DESKTOP_SESSION to one of these strings as you did.

Additional workarounding NB fix for this issue would be to get information about UI session in different way. Probably it could be possible to run on linux machines something like 'ps -A | egrep -i "mate"'. Svata could know better way how to check the UI session.
Comment 19 kawazu428 2013-11-21 20:12:49 UTC
+1ing myself. Same here. Linux Mint Debian Edition, Mate 1.6.x. Manually resizing things works. Remember having something like this ages ago on XFCE, interesting to see it popping up again.
Comment 20 Stanislav Aubrecht 2013-12-09 15:48:42 UTC
This is actually a JDK bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7057467 and NetBeans attempts to provide a workaround for it.

Please vote for the the JDK bug and use one of the workarounds listed in this issue.
Comment 21 Stanislav Aubrecht 2013-12-11 09:36:11 UTC
*** Bug 239293 has been marked as a duplicate of this bug. ***
Comment 22 Lope 2013-12-20 00:21:03 UTC
I just deleted some source code because I quickly (thought) I clicked rename but netbeans registered my click as 'delete'. Then I just quickly hit 'yes' thinking "yes I want to rename" on the confirmation.

Uncool.
Comment 23 Lope 2013-12-20 00:30:53 UTC
OMG amazing adding export DESKTOP_SESSION=gnome to the netbeans startup solves the problem.

THANK YOU :)
Comment 24 Lope 2013-12-20 00:31:16 UTC
oops, lets close this.
Comment 25 michael_n 2013-12-20 06:17:23 UTC
(In reply to Stanislav Aubrecht from comment #20)
> This is actually a JDK bug
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7057467 and NetBeans
> attempts to provide a workaround for it.
> 
> Please vote for the the JDK bug and use one of the workarounds listed in
> this issue.

Can anyone else see this jdk bug? All I get is "This bug is not available. More information is available here", and "here" points (unsurprisingly) to a completely blank FAQ at http://bugs.sun.com/bugdatabase/faq.do

Although this isn't a netbeans bug per-se (i.e., it's a jdk bug), it's a very tricky one to diagnose & resolve.  I'm not certain it should be closed as "resolved fixed" (which it currently is) until the base jdk bug is really fixed (is it? I can't tell...).

Although there is a work-around (i.e., setting an env var), it really isn't fixed until the "work-around" is no longer necessary (just my humble opinion...)

Fwiw, I added a generic shell script that guesses and sets the DESKTOP_SESSION (since I re-use my same $home across all OS's/desktops) => https://gist.github.com/mscottnielsen/8051065
Comment 26 _ rkubacki 2013-12-24 14:41:25 UTC
Seriously, this is not fixed. I can accept closing as won't fix but please: add a viable  workaround and valid link to JDK bugtracker to let us vote there.

I can confirm that exporting DESKTOP_SESSION=gnome-shell in $NETBEANS_HOME/etc/netbeans.conf works on my Debian Jessie machine.

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.11-2-amd64 running on amd64; UTF-8; en_US (nb)
User directory: /home/radim/.netbeans/7.4
Cache directory: /home/radim/.cache/netbeans/7.4
Comment 27 Stanislav Aubrecht 2014-01-06 09:39:28 UTC
You can try voting this JDK bug: https://bugs.openjdk.java.net/browse/JI-9006605
But I'm not sure if it's visible outside the Oracle network.

The only workaround is DESKTOP_SESSION=gnome-shell

This isn't a NetBeans bug, all Java applications are affected AFAIK
Comment 28 nenadalm 2014-10-24 14:27:12 UTC
I also have issue with this if DESKTOP_ENVIRONMENT is set to "awesome". If I set it to "gnome" it works as expected.

I checked links inside the discussion but I couldn't see bugreports there.
Comment 29 nenadalm 2014-10-24 14:29:58 UTC
it's DESKTOP_SESSION (not DESKTOP_ENVIRONMENT as I wrote in previous post)
Comment 30 Stanislav Aubrecht 2014-10-24 15:01:48 UTC
(In reply to nenadalm from comment #28)
> I also have issue with this if DESKTOP_ENVIRONMENT is set to "awesome". If I
> set it to "gnome" it works as expected.
> 
> I checked links inside the discussion but I couldn't see bugreports there.

And why are you reopening this bug?
Comment 31 riksoft 2015-03-23 10:50:57 UTC
Linux Mint Maya + Mate
OpenJDK 7 from repo
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~precise1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)


$ echo $DESKTOP_SESSION
mate


I've just installed Netbeans 8.02 and the the bug is still there and the workaround doesn't work.

I've also forced DESKTOP_SESSION to gnome but no luck
I've also forced DESKTOP_SESSION to gnome-shell but no luck

Any chance I can use Netbeans menu?
Comment 32 Stanislav Aubrecht 2015-03-23 13:05:15 UTC
(In reply to riksoft from comment #31)
> Linux Mint Maya + Mate
> OpenJDK 7 from repo
> java version "1.7.0_75"
> OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~precise1)
> OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
> 
> 
> $ echo $DESKTOP_SESSION
> mate
> 
> 
> I've just installed Netbeans 8.02 and the the bug is still there and the
> workaround doesn't work.
> 
> I've also forced DESKTOP_SESSION to gnome but no luck
> I've also forced DESKTOP_SESSION to gnome-shell but no luck
> 
> Any chance I can use Netbeans menu?

Any chance you can try the workaround with Oracle JDK instead of OpenJDK which known to have many issues?
Comment 33 riksoft 2015-03-23 15:37:34 UTC
Yes, it works with the jre8 (I only use it for php/html5 not for java development).

I downloaded the tar and set netbeans_jdkhome to the jre path, and now the menu works like a charm!
Comment 34 Niles86 2015-04-29 10:18:59 UTC
(In reply to riksoft from comment #33)
> Yes, it works with the jre8 (I only use it for php/html5 not for java
> development).
> 
> I downloaded the tar and set netbeans_jdkhome to the jre path, and now the
> menu works like a charm!

I just downloaded the jre tar.gz file and unpacked it in "/usr/lib" so I changed

>netbeans_jdkhome="/usr/lib/jvm/java-7-openjdk-amd64"
in
>netbeans_jdkhome="/usr/lib/jre1.8.0_45"

The IDE works good but the project I build with the jvm are flagged as "broken".
Have I do something wrong??


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo