Closed Bug 746583 Opened 12 years ago Closed 10 years ago

Window Close Button don't bind "close" event without Aero in Windows 7

Categories

(Firefox :: Shell Integration, defect)

11 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 827880

People

(Reporter: bugzilla.mozilla.org, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643

Steps to reproduce:

Reported bug don't involve with mentioned ext, but with Firefox.

I tested this on Windows 7 Pro and Windows 2008 Server R2 (as remote terminal).  This problem affects both.

I installed extension called "Minimize on start and close" (https://addons.mozilla.org/pl/firefox/addon/minimize-on-start-and-close/?src=search). I'm aware there is information about working only with older versions od Firefox, but the extension is very simple and works in newer versions as well. Extension looks like just left by developer.

In the source (https://addons.mozilla.org/pl/firefox/files/browse/87490/file/chrome/content/moscFunc.js#top) in line 42 there is binding to event "close" on window object, which is simple way to describe what this extension should do.


Actual results:

Mentioned binding of "close" event works perfectly in Windows 7, but only if "full" Aero is enabled. If there is set theme of old versions (like XP) or the new look (but without full Aero = transparencies and that all stuff), the binding with X button in the corner don't work. Binding with Alt+F4 works in all cases, but binding with close button in corner works only if there is full Aero turned on.

What interesting I'm using the same extension in Thunderbird and X button works ok in all cases and not depends on selected theme. So it's not bug with Windows.


Expected results:

I think that "close" event binding shoud work whatever we have or don't have Aero.

In case of this extension, the extension shoud work in all cases.
Component: Untriaged → Shell Integration
I can also confirm this behavior in Firefox 26 on Windows 7 using the extension mentioned by nereusz and also in a custom extension I wrote myself.  Another extension developer I am in contact with also confirmed this behavior.

The "close" event will work with Aero but not without Aero in Windows 7.  Interestingly, the "close" event will work in Windows XP and in Linux, neither of which offer Aero.

I consider this an important bug to be fixed.  I am surprised that it was not caught and fixed long ago.
To clarify what I mean when I say "without Aero"...

If one right-clicks on the Windows 7 desktop and selects "Personalize", the "Personalization" Control Panel application starts up.  There you can select from a number of desktop themes which are generally grouped as either "Aero Themes" or "Basic and High Contrast Themes".

In my testing, I sampled a number of the themes in each of those 2 groups.  The bug which I and others have reported occurs with the "Basic and High Contrast Themes" and does not occur with the "Aero Themes" (assuming your h/w will support Aero).

The bug is easily reproduced by, for example, using the "Minimize On Start And Close" add-on under the test conditions described in the previous paragraph.  The original Bugzilla posting also describes a similar test procedure.

I confess I do not know the fine points of Aero but it should be clear that this is an obvious Firefox bug.  I am not really qualified to fix this bug other than to report it and hope that it does get taken care of.
There is a significant discussion of this bug posted at the mozillaZine Extension Development forum here:  http://forums.mozillazine.org/viewtopic.php?f=19&t=2793791

Here are a few extracts from that discussion:

-----------------------------------------------------------------
Patrick, you are right. The problem is related to the state of the Firefox menubar when run in Windows.

I am still a bit confused by your theme classifications (I am no Aero expert). Here is what I found using themes in the Windows 7 desktop Personalization Control Panel:

1. With the menubar disabled, does it work in all of the listed Aero themes?
OK
2. With the menubar enabled, does it work in all of the listed Aero themes?
OK

3. With the menubar disabled, does it work in the Windows 7 Basic theme?
BUG
4. With the menubar enabled, does it work in the Windows 7 Basic theme?
OK

5. With the menubar disabled, does it work in the Windows 7 Classic Theme?
BUG
6. With the menubar enabled, does it work in the Windows 7 Classic Theme?
OK


Here is what I found running Firefox on Windows XP running in VirtualBox:
7. With the menubar disabled, does it work in Windows XP?
BUG
8. With the menubar enabled, does it work in Windows XP?
OK


Here is what I found running Firefox on Linux Mint running in VirtualBox:
7. With the menubar disabled, does it work in Linux?
OK
8. With the menubar enabled, does it work in Linux?
OK

----------------------------------------------------------------------

So the problem is with the Vista/7 implementation of the custom "draw in titlebar" window control buttons.

You might also want to test all of this in fullscreen mode as well since that uses custom window control buttons as well.

---------------------------------------------------------------------

Fullscreen is a problem in Windows 7 with or without the menubar and with or without an Aero theme.

Fullscreen is a problem in Windows XP with or without the menubar.

Fullscreen is also a problem in Linux Mint with or without the menubar.

---------------------------------------------------------------------

So that sound's like the heart of your problem, the event listener is not being properly fired by XUL close-buttons.
I can confirm the problem with:
TB 24, 27 on XP, 7 menubar on or off
FF 27, 28 on XP, 7 menubar off only
Alt+F4 always works
Fullscreen is also problematic in all situations.
This looks very similar to bug 827880. Will comment over there.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.