Closed Bug 566135 Opened 14 years ago Closed 14 years ago

Full screen games automatically minimize when firefox is minimized on the taskbar

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: samuel.marineau.cyr, Assigned: jimm)

References

Details

(Whiteboard: [needs review])

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

If I try to open a full screen game and firefox is in the taskbar, this game will automatically minimize and if I try to expand the game, it does the same thing, again and again...

Reproducible: Always

Steps to Reproduce:
1.Minimize Firefox
2.Open a full screen game
3.
Actual Results:  
The game minimize

Expected Results:  
The game should stay full screen instead of minimizing

It happens only when Firefox opens, so it isn't a problem from the computer. I only use adblock plus and noscript.
Which game ? Is it one that runs in your browser (Flash ?) or an external application ?
Thanks for your reply.

The problem is with external applications and the games wich I had problems are :
-World Of Goo
-Betrayal At Krondor (GOG.com version)
-Another World
-Oddworld series
And some other games.

But there isn't any problems for somes games like Braid...

And if I disable desktop composition, the game doesn't minimize anymore.

So, I guess that the problem is with only some games combined to Areo theme combined to Firefox...
Component: General → Widget: Win32
Product: Firefox → Core
QA Contact: general → win32
Version: unspecified → Trunk
maybe related to bug 524165?

Samuel, do you have the new tab previews enabled?
Summary: Full screen games automatically minimize when firefox is minimized → Full screen games automatically minimize when firefox is minimized on the taskbar
No and I tried to enable it and it changes nothing. And I don't think it is related to this bug... I don't have any problems to minimize Firefox.

But thanks for your effort :)
i also have this bug, thus for this reason i created a bugzilla account.
It happens to almost all fullscreen games (counter strike ,quake 4 etc.) at all times, unless aero is disabled.. oh and i'm running vista with the latest updates from nvidia and microsoft..latest version of firefox too. Hope someone will get this fixed soon, it's very annoying!!
This also happens to all of my full screen games. I run Vista32. Sometimes minimizing Firefox helps, but generally I close Firefox before I play a game.
It took me forever to track down what was wrong, but I have verified that it is indeed Firefox that is causing my games to minimize.
Many others are also having this issue. I'll attach some threads in my next post.
Not sure if I can put URLs here, but if you Google "firefox minimize games" you will see that many others also have this problem.
You're right, it seems that there is a lot of people having this problem... And I checked Firefox 3.6.4 complete list of changes and the problem doesn't seem to be resolved.

I hope they fix that soon.
blocking2.0: --- → ?
Can anyone confirm this? Not going to block until we know it's a for-sure problem.
i see firefox support is baaad i'm thinking to switch to something else until this gets fixed, there's no way i'm disabling aero for firefox to work properly.
i can make a video about this very annoying bug and post it on youtube if it helps someone?!?
It would be a great idea to make a video to show to Mozilla the bug in action and to gain more visibility. It would be very appreciated :)
And Joe Drew, as felixqleung said, it is confirmed by a lot of people on internet if you look for "firefox minimize games" on goole...
Thank you for the links! I hope they take seriously this issue and release a fix in firefox 3.6.4...
it's not because of add-ons...firefox in safe mode with everything disabled still does the same thing..:( this was the first thing i tried.
Video will be up in a week or so. Maybe they'll fix it until then;)
Alright I'll set it to confirmed even though I can't confirm myself (having only XP and Mac). Note that I don't agree with 'confirmed by lots of people', this is the only bug report, which is a low number if it was a fundamental issue. Don't forget that there are tens of millions of people running FF on Windows 7. Finding a few links in Google is no indication of a widespread problem.

Maybe a regression from bug 499816. It might also be caused by the OS (meaning, those games get minimized because the OS is convinced that FF needs to be the front app).. Is anyone of you using the config.trim_on_minimize preference (which you shouldn't, but that's another story) ?

PS : it will definitely not be in Firefox 3.4, that code is already ready since late April (it's being extensively tested since it changes a lot of stuff with plugins).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Not using config.trim_on_minimize preference... this bug has something to do with aero... on windows xp and vista basic or anything with aero off this bug doesn't occur at all.
Ok i tested with my old pc. Latest firefox, windows vista sp1, 2 year old ati driver,aero ON, and the bug doesn't occur either.
My friend which has vista sp2, up-to-date ati driver,latest firefox, the bug happens.
It seems it has something to do with the latest video drivers and/or windows updates and aero being on.
and as a hint...if you keep your firefox window on-screen, maximized or not, this will not happen. Only if it's minimized the bug keeps happening.
I am not able to reproduce on trunk of 3.6.3 with the Starcraft II Beta or Sins of a Solar Empire. I was not able to figure out how to get World of Goo to not disable composition. I've got an ATi card and 64 bit Windows 7.
instead of giving unimportant comments like "i will use another browser *whine*" you should rather VOTE for this BUG to make it much more important. 
Because. more VOTES means higher importance. Got it?
So now vote. 

Here the same thing again (because that bugzilla thing confused me, so i made a new one for the same problem):
https://bugzilla.mozilla.org/show_bug.cgi?id=575588

I added a list of plugins and addons i am running in the fresh profile.
The bug doesn't occur on the new firefox build, new video drivers and windows 7.
The problematic games were:counter-strike,half-life,doom3,quake4. they were all running under opengl with nvidia card. Flatout2,serious sam, etc this did not have any problem(directx games).
I am sorry, but i was unable to film the bug properly due to resolution change when starting the games, it seems the recording program was getting messed up input.(i tried camtasia 7)
RE: So now vote. 
Voted!
I just installed 3.6.6. and this is still a problem for me.
felixwleung@yahoo.ca
do you have an nvidia card? anyway try updating your video drivers and see if this changes anything.
We really need steps to reproduce here.
Assignee: nobody → jmathies
blocking2.0: ? → final+
RE: do you have an nvidia card? anyway try updating your video drivers and see if
this changes anything.
I have an ATI Radeon HD 2900XT card. I updated the drivers. No dice.

RE: We really need steps to reproduce here.
I wish I could help. If I run ANY full-screen game, it will automatically minimize when it loads. Try to Maximize it, and it will minimize again instantly. The only solution is to close Firefox, then Maximize.
Has anyone tried disabling trim on minimize? Set 'config.trim_on_minimize' to true in prefs, it might fix it.
I don't see a 'config.trim_on_minimize' option in 'about:config'.
It doesn't exits, you need to create it. It's normally not advisable to set it (it's about memory trimming when a window is minimized, but it doesn't work in Vista anymore) since it created various problems. But since it also triggers when a window is minimized ...
OK, so in about:config I created a new boolean called "config.trim_on_minimize", and set it to True.
It worked! I have Firefox open, and my games are running normally. 

RE: but it doesn't work in Vista anymore
I am running Vista.

RE: It's normally not advisable to set it
OK, I'm deleting the rule for now. Hmmm... won't let me. I selected "Reset" and now it's a string. Whatever.
Note: Update 3.6.7 just automatically installed. The issue is still there (remember I removed the "trim on minimize" line though.
I just tried adding the "config.trim_on_minimize" line back. Now it's working properly; games are no longer minimizing.
(In reply to comment #29)
> It doesn't exits, you need to create it. It's normally not advisable to set it
> (it's about memory trimming when a window is minimized, but it doesn't work in
> Vista anymore) since it created various problems. But since it also triggers
> when a window is minimized ...

Actually it's probably quite ok to set this, most users on or even XP and up don't need it. We considered removing it completely a year or so ago but didn't because we still supported 2K. I've had this set for years, the code it disables is really quite offensive.
(In reply to comment #33)
> (In reply to comment #29)
> > It doesn't exits, you need to create it. It's normally not advisable to set it
> > (it's about memory trimming when a window is minimized, but it doesn't work in
> > Vista anymore) since it created various problems. But since it also triggers
> > when a window is minimized ...
> 
> Actually it's probably quite ok to set this, most users on or even XP and up
> don't need it. We considered removing it completely a year or so ago but didn't
> because we still supported 2K. I've had this set for years, the code it
> disables is really quite offensive.

*most users on Vista or even XP
How to reproduce:

1. Enable Aero (Desktop Composition)
2. Open Firefox
3. Minimize Firefox
4. Start fullscreen game (I only tested with Warcraft 3)

Warcraft 3 will start to maximize, black screen will appear and then it'll minimize, and Desktop will be focused (even when there's another window maximized).

Workaround is to focus Firefox (maximized or restored) before starting game or to set "Disable Desktop Composition" in Compatibility settings of game .exe file.

Works with Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2b3pre) Gecko/20091112 Namoroka/3.6b3pre
Broken with Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2b3pre) Gecko/20091113 Namoroka/3.6b3pre

So, yeah, it seems that fix for bug 499816 caused this.

Windows 7 64-bit, nVidia drivers 258.96, Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100808 Minefield/4.0b4pre
Attached patch patch (obsolete) — Splinter Review
So the reason why this is happening: when a full screen game takes the desktop, desktop composition shuts down. This triggers a WM_DWMCOMPOSITIONCHANGED event, which ends up getting pre-processed by windows uxtheme code. This code, for whatever reason, calls ShowWindow on our SW_SHOWMINIMIZED window.

The desired fix here imho is to remove trim on minimize, since there is little evidence it is needed anymore. But it's too late in the dev cycle to do that in 4.0. (I'll post a patch in a follow up that does that and we can land it on trunk once we branch for lots of bake time.) In the mean time, this is a little one off, which doesn't appear to be too risky. When our window is minimized and we receive a poschanging event where activation is not occurring, we skip off sending the NS_SIZEMODE event which brings the window up. 

I'll have try server builds for people to test sometime tonight or tomorrow.
Attached patch patchSplinter Review
missed a part.
Attachment #471237 - Attachment is obsolete: true
msn free trial action games are useful in testing:

http://zone.msn.com/en-us/home

(They disable after an hour's use.)
Please excuse a noob, but is there any way I can download that patch?
(In reply to comment #40)
> Please excuse a noob, but is there any way I can download that patch?

No. You can try a try build once it's completed to test the fix though.

You can also fix this by disabling trim on minimize. Create a bool pref named "config.trim_on_minimize" in about config, set it to true, and restart the browser.
(In reply to comment #41)
> (In reply to comment #40)
> > Please excuse a noob, but is there any way I can download that patch?
> 
> No. You can try a try build once it's completed to test the fix though.
> 
> You can also fix this by disabling trim on minimize. Create a bool pref named
> "config.trim_on_minimize" in about config, set it to true, and restart the
> browser.

try builds:

http://ftp.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/jmathies@mozilla.com-22b9026de406/
Has anyone seen this happen on os other than vista and win7?
Comment on attachment 471244 [details] [diff] [review]
patch

This seems pretty safe. We don't create windows with WS_EX_NOACTIVATE in nswindow. So I don't see how we would have a minimized window we wanted to restore without activation.
Attachment #471244 - Flags: review?(neil)
Comment on attachment 471244 [details] [diff] [review]
patch

>-  if (info->flags & SWP_FRAMECHANGED && mSizeMode != nsSizeMode_Fullscreen) {
>+  if ((info->flags & SWP_FRAMECHANGED && !(info->flags & SWP_NOSIZE)) &&
>+      mSizeMode != nsSizeMode_Fullscreen) {
I don't have access to aero either, so I'd prefer if you could find an alternative reviewer, but if you can't, I'd like to know what this does.
Attachment #471244 - Flags: review?(neil)
(In reply to comment #45)
> Comment on attachment 471244 [details] [diff] [review]
> patch
> 
> >-  if (info->flags & SWP_FRAMECHANGED && mSizeMode != nsSizeMode_Fullscreen) {
> >+  if ((info->flags & SWP_FRAMECHANGED && !(info->flags & SWP_NOSIZE)) &&
> >+      mSizeMode != nsSizeMode_Fullscreen) {
> I don't have access to aero either, so I'd prefer if you could find an
> alternative reviewer, but if you can't, I'd like to know what this does.

Added filtering for the size mode event we send in OnWindowPosChanging. It was being triggered here, but there's no point in sending it if the size mode of the window isn't changing. So, for example we want the event if the window is going from fullscreen -> normal, or normal -> maximized, or maximized -> fullscreen. But we don't care if some other property on the window changed that isn't related to size.
Attachment #471244 - Flags: review?(tellrob)
Comment on attachment 471244 [details] [diff] [review]
patch

I was not able to reproduce the bug but this patch looks pretty safe to me.
Attachment #471244 - Flags: review?(tellrob) → review+
(In reply to comment #48)
> Comment on attachment 471244 [details] [diff] [review]
> patch
> 
> I was not able to reproduce the bug but this patch looks pretty safe to me.

If you have that trim on minimize pref set, you wouldn't see it.
http://hg.mozilla.org/mozilla-central/rev/fff8f84d0f94
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
See Also: → 1782134
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: