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 56986 - Shift-F10 broken on Windows
Summary: Shift-F10 broken on Windows
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2005-03-25 12:55 UTC by Jan Chalupa
Modified: 2008-12-22 18:58 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Chalupa 2005-03-25 12:55:44 UTC
[custom build of 2005-03-25 sources + 2005-03-23 nightly; JDK 1.5.0_01]

Shortcut for invoking context popup menu (Shift-F10) always opens the Projects
view's context menu this seems to occur on Windows only.

Steps to reproduce:

1. Move focus to Editor
2. Press Shift-F10
3. The Projects View context menu pops up (in Projects view)
4. Try the same with Navigator, same behavior

It started with the nightly build of 2005-03-23, 03-22 seems to be ok. I
originally thought this was caused by Yarda's fix of issue #37258, but I tried
to rollback his changes, rebuilt and the problem is still reproducible. Another
suspect is the TopComponent fronting integrated at the same time, so I'm passing
this to you Stan. Please evaluate and re-assign if it's not yours.
Comment 1 Stanislav Aubrecht 2005-03-25 18:07:15 UTC
i added a temporary hotfix for this issue - the default action in TreeView is
enabled only when the TreeView has input focus. 
but i'm not sure that this is the right place to fix the problem.

Checking in src/org/openide/explorer/view/TreeView.java;
/cvs/openide/src/org/openide/explorer/view/TreeView.java,v  <--  TreeView.java
new revision: 1.188; previous revision: 1.187
done
Comment 2 Jan Chalupa 2005-03-26 09:12:51 UTC
I don't think we should be putting in new workarounds until we understand which
change triggered the problem and why.

I investigated it more and found another change that might have caused this. See
issue #40185. The change appeared for the first time in 2005-03-23 nightly build
and that was when I started seeing problems with popup menus invoked via keyboard.

I tried to revert some of the changes introduced by the fixing of #40185 and the
problem with popup menus disappeared. IMO, the change should be completely
reverted and reviewed again.

The good news is that the TopComponent fronting seems to have nothing to do with
this.
Comment 3 Marian Mirilovic 2005-03-31 09:47:32 UTC
This issue has TM=future and it's P2, so if you don't plan to fix it for NB4.1
ask for waiver, or change TM.
(I don't agree with waiver, just for note now)
Comment 4 Jan Chalupa 2005-03-31 10:48:37 UTC
Don't worry. This one is not going to be waived.
Comment 5 Jaroslav Tulach 2005-04-03 06:42:01 UTC
I believe that the problem is in PopupAction being able to "surviveFocusChange".
Imho that is nonsence - that way the popup action trigger (s-f10) stays active
for a component that was previously selected even other component is active
(which seems exactly like the described behaviour). Actually I have found a comment:

Index: PopupAction.java
===================================================================
RCS file: /cvs/openide/src/org/openide/actions/PopupAction.java,v
retrieving revision 1.8
diff -u -r1.8 PopupAction.java
--- PopupAction.java	27 Aug 2003 20:35:03 -0000	1.8
+++ PopupAction.java	3 Apr 2005 06:34:03 -0000
@@ -24,8 +24,6 @@
     
     protected void initialize() {
         super.initialize();
-        // XXX revisit:
-        setSurviveFocusChange(true);
         // Cf. org.netbeans.core.windows.frames.NbFocusManager:
         putProperty ("OpenIDE-Transmodal-Action", Boolean.TRUE); // NOI18N
     }

Ok, I think there is time to revisit this and fix it. I'll make the action
non-focusSurviving. 
Comment 6 Jaroslav Tulach 2005-04-03 07:07:21 UTC
cvs ci -m "#56986: PopupAction should not surviveFocusChange"

Checking in PopupAction.java;
/cvs/openide/src/org/openide/actions/PopupAction.java,v  <--  PopupAction.java
new revision: 1.9; previous revision: 1.8

Now the problem shall be fixed. I'll verify as soon as I get to windows box. It
always worked ok on my linux 1.5.0_03. The Standa's fix shall no longer be
necessary, but it can stay as it is in fact correct - the view does not want to
show its popup when it does not have focus.
Comment 7 Jan Chalupa 2005-04-03 09:15:33 UTC
Ok, seems to work fine for me with a custom build (fresh update, Standa's patch
to TreeView disabled). I tested on Win XP with JDK 1.4.2 and 1.5.0. Shift-F10
worked as expected in all views.

I think it can be considered fixed now and the rollback of #40185 doesn't seem
to be necessary anymore.
Comment 8 Jaroslav Tulach 2005-04-03 19:13:17 UTC
I've just verified it on two custom builds from a week ago (without Standa's
patch), without my latest change, the reported problem was reproducible, with
it, it was not.