Closed Bug 525762 Opened 15 years ago Closed 14 years ago

Alt+Tab sometimes causes the menubar to unhide briefly

Categories

(Core :: Widget: Win32, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

()

VERIFIED FIXED
mozilla1.9.3a4
Tracking Status
status1.9.2 --- .4-fixed
status1.9.1 --- .10-fixed

People

(Reporter: dao, Assigned: neil)

References

Details

(Keywords: regression, verified1.9.2, Whiteboard: calm-ui)

Attachments

(1 file, 3 obsolete files)

      No description provided.
Whiteboard: calm-ui
Attached patch patch (obsolete) — Splinter Review
Attachment #409613 - Flags: review?(neil)
Attached patch patch v2 (obsolete) — Splinter Review
Err, of course I shouldn't use Cc and Ci here.
Attachment #409613 - Attachment is obsolete: true
Attachment #409614 - Flags: review?(neil)
Attachment #409613 - Flags: review?(neil)
Attached patch patch v2 (obsolete) — Splinter Review
updated to tip
Attachment #409614 - Attachment is obsolete: true
Attachment #424480 - Flags: review?(neil)
Attachment #409614 - Flags: review?(neil)
Sorry, but I just haven't been able to reproduce this, either by Alt+Tabbing to another application or to another window in the same Gecko application.
Can you still review the code? Considering the menubar active in an inactive window doesn't make sense either way.

It happens for me every second try, approximately. But as I said, it's probably system dependent.
Attachment #424480 - Flags: review?(neil) → review?(enndeakin)
Comment on attachment 424480 [details] [diff] [review]
patch v2

>+      <property name="_isWinActive" readonly="true">
>+        <getter><![CDATA[
>+          var fm = Components.classes["@mozilla.org/focus-manager;1"]
>+                             .getService(Components.interfaces.nsIFocusManager);
>+          return window == fm.activeWindow;

Should we be concerned that this will only work if the <menubar> is in the toplevel window?


>+      <handler event="DOMMenuBarActive"><![CDATA[
>+        // It's possible that we're getting DOMMenuBarActive even if the window
>+        // isn't active anymore because of Alt+Tab.

Isn't that a bug in itself?

I don't see the bug though. DOMMenuBarActive should be sent on keyup, so the menu shouldn't be triggered then. Maybe some locale keyboard difference?
(In reply to comment #6)
> (From update of attachment 424480 [details] [diff] [review])
> >+      <property name="_isWinActive" readonly="true">
> >+        <getter><![CDATA[
> >+          var fm = Components.classes["@mozilla.org/focus-manager;1"]
> >+                             .getService(Components.interfaces.nsIFocusManager);
> >+          return window == fm.activeWindow;
> 
> Should we be concerned that this will only work if the <menubar> is in the
> toplevel window?

I don't think so... auto-hiding doesn't make sense for other menubars, since Alt wouldn't activate them.

> >+      <handler event="DOMMenuBarActive"><![CDATA[
> >+        // It's possible that we're getting DOMMenuBarActive even if the window
> >+        // isn't active anymore because of Alt+Tab.
> 
> Isn't that a bug in itself?
> 
> I don't see the bug though. DOMMenuBarActive should be sent on keyup, so the
> menu shouldn't be triggered then. Maybe some locale keyboard difference?

I think it's because the event is async and the netbook I'm running Win XP on is rather slow...
> > I don't see the bug though. DOMMenuBarActive should be sent on keyup, so the
> > menu shouldn't be triggered then. Maybe some locale keyboard difference?
> 
> I think it's because the event is async and the netbook I'm running Win XP on
> is rather slow...

DOMMenuBarActive shouldn't be firing at all.

Can you debug here a bit a find out what menu/popups related events and key events are actually firing when?
When releasing Alt+Tab quickly, regardless of whether the menu bar shows up, I get these events:

keydown, keyup, deactivate, DOMMenuBarActive, DOMMenuItemActive, DOMMenuBarInactive, DOMMenuItemInactive

If I release Tab and wait a bit before releasing Alt, the menu bar never shows up and I get these events:

keydown, keyup, keyup, deactivate
This is actually a regression of bug 262894 by bug 272847.
Assignee: dao → nobody
Blocks: 272847
No longer blocks: 477256
Component: Toolbars and Toolbar Customization → Widget: Win32
Keywords: polishregression
Product: Toolkit → Core
QA Contact: toolbars → win32
Version: 1.9.2 Branch → Trunk
Attachment #424480 - Flags: review?(enndeakin)
Attached patch Proposed patchSplinter Review
Assignee: nobody → neil
Attachment #424480 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #434643 - Flags: review?(jmathies)
Comment on attachment 434643 [details] [diff] [review]
Proposed patch

oops!
Attachment #434643 - Flags: review?(jmathies) → review+
Pushed changeset 91897531cbf5 to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 434643 [details] [diff] [review]
Proposed patch

Seeking approval for this simple fix for the branches where the regression typo landed.
Attachment #434643 - Flags: approval1.9.2.3?
Attachment #434643 - Flags: approval1.9.1.10?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a4pre) Gecko/20100326 Minefield/3.7a4pre

Works like a charm.
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla1.9.3a4
Comment on attachment 434643 [details] [diff] [review]
Proposed patch

a=beltzner for 1.9.1.10 and 1.9.2.3
Attachment #434643 - Flags: approval1.9.2.3?
Attachment #434643 - Flags: approval1.9.2.3+
Attachment #434643 - Flags: approval1.9.1.10?
Attachment #434643 - Flags: approval1.9.1.10+
Pushed changeset 499f6d27d231 to releases/mozilla-1.9.2

Pushed changeset 0865dc62ccad to releases/mozilla-1.9.1
Dão can you verify this with the nightly 1.9.2 and 1.9.1 builds since you can reproduce the problem easily?
Verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.9.2.4pre) Gecko/20100413 Namoroka/3.6.4pre
Keywords: verified1.9.2
Cannot verify on 1.9.1, as the menu bar doesn't support auto-hiding there.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: