Closed Bug 127575 Opened 23 years ago Closed 22 years ago

enable full screen mode to function on secondary display of multi-monitor systems

Categories

(Core :: XUL, enhancement)

x86
Windows 98
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: ruediger, Assigned: deanis74)

References

()

Details

Attachments

(1 file, 2 obsolete files)

When using Mozilla on a Windows-XP system with more than one monitor attached
(multi-monitor) and you put a window into full screen mode that is on the
secondary display, the window is always shown on the primary display. However,
the full screen window has the dimensions of the secondary display (can be seen
only when using displays with different resolutions).
Full screen mode for windows on the primary display works fine.

Reproducible: Always
Steps to Reproduce:
1. Start mozilla on a multi-monitor system (Windows XP)
2. Move window to secondary display
3. Switch to full screen mode (F11)
To hewitt
Assignee: asa → hewitt
same with windows 2000
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Future
Same problem on build 2002031104 XP and 2000, I didn't see this bug originally
and filed a dup.  Could we add the word 'multiple' instead of or in addition to
the word 'multi-' to the summary?
*** Bug 133848 has been marked as a duplicate of this bug. ***
Problem persists in RC1.  Also, it looks like Mozilla is hiding the taskbar on
full-screen.  How about the other always on top application bars when it is on
another monitor?  From the current behaviour, it looks like those bars will
cover up the mozilla full screen window.
*** Bug 146243 has been marked as a duplicate of this bug. ***
this looks like a duplicate of bug 71201
I am not sure it is the same problem since the window state can be 'tricked'
into remember being in the other monitor through a series of open and closes,
but I haven't gotten that to work for full screen mode.
*** Bug 150999 has been marked as a duplicate of this bug. ***
*** Bug 139370 has been marked as a duplicate of this bug. ***
URL: http:/
Severity: normal → enhancement
Component: Browser-General → XP Toolkit/Widgets
Keywords: helpwanted
Summary: On multi-monitor systems, switching to full screen mode moves window to primary display. → enable full screen mode to function on secondary display of multi-monitor systems
*** Bug 155464 has been marked as a duplicate of this bug. ***
*** Bug 151704 has been marked as a duplicate of this bug. ***
*** Bug 153697 has been marked as a duplicate of this bug. ***
per a posting in de.comm.software.mozilla, this happens on linux too. os->all
(message-id <3D621C37.FD6B0302@imr.uni-hannover.de>, in german)
OS: Windows XP → All
err, no idea why I thought that was on linux; it was windows (but windows 98,
therefore setting os to win98)
OS: All → Windows 98
*** Bug 164859 has been marked as a duplicate of this bug. ***
*** Bug 164926 has been marked as a duplicate of this bug. ***
This is also a bug in Linux. Please read my comments in this bug, as it provides
more details about this in versions of mozilla for XFree:

http://bugzilla.mozilla.org/show_bug.cgi?id=164926

Thanks
*** Bug 165159 has been marked as a duplicate of this bug. ***
A few thoughts about this bug:

Note that in windows machines using the nvidia driver, there's this feature
called nview, which is a "window manager" level feature that does not allow a
program to become full screen across multiple monitors. AFAIK, no other driver
does this.

This feature doesn't exist in Linux, presumably since there can be many window
managers, and the task of maximizing is usually a job that is left up to the
window manager. The only sollution for Linux would be to detect the presence of
Xinerama XFree extensions and use the information supplied by the Xinerama API
to maximize the window into the monitor it's currently occupying.

Examples of programs that do this are mplayer, xine, and xawtv.

I hope this information is helpful. Otherwise, nevermind. :)
This bug happens because of this code in GlobalWindowImpl::SetFullScreen():

http://lxr.mozilla.org/mozilla/source/dom/src/base/nsGlobalWindow.cpp#1950

It gets the size of the current screen, but then moves to 0,0.  We should move
to the top-left of the current screen.  We should use, I think, availTop and
availLeft instead.

- MoveTo(0, 0);
+ PRInt32 screenLeft;
+ PRInt32 screenTop;
+ screen->GetAvailLeft(&screenLeft);
+ screen->GetAvailTop(&screenTop);
+ MoveTo(screenLeft, screenTop);

Can someone with multiple monitors try this?
*** Bug 164198 has been marked as a duplicate of this bug. ***
*** Bug 168329 has been marked as a duplicate of this bug. ***
*** Bug 169463 has been marked as a duplicate of this bug. ***
*** Bug 182025 has been marked as a duplicate of this bug. ***
Has anyone tried my suggestion in comment 21?
*** Bug 182024 has been marked as a duplicate of this bug. ***
*** Bug 182889 has been marked as a duplicate of this bug. ***
*** Bug 173839 has been marked as a duplicate of this bug. ***
*** Bug 185577 has been marked as a duplicate of this bug. ***
*** Bug 184205 has been marked as a duplicate of this bug. ***
Please everyone,

if you'd like this bug fixed, vote for it.  It doesn't seem to be going anywhere. =)

I am crossing my fingers that this will help it get fixed soon.
Mike: I suggested a fix in comment 21.  I need someone with a second monitor to
test it.
Updating URL.  The code I'm thinking about looks to now be in
nsBaseWidget::MakeFullScreen().
Attached patch patch take 1 (obsolete) — Splinter Review
This doesn't break anything in my single-monitor setup.  Kerz, can you try it
on your multi setup?
Comment on attachment 109508 [details] [diff] [review]
patch take 1

>     // Hide all of the OS chrome
>     if (fullScreen)
>       fullScreen->HideAllOSChrome();
>-  } else if (mOriginalBounds) {
>-    Resize(mOriginalBounds->x, mOriginalBounds->y, mOriginalBounds->width,
>-           mOriginalBounds->height, PR_TRUE);
>+    } else if (mOriginalBounds) {
>+      Resize(mOriginalBounds->x, mOriginalBounds->y, mOriginalBounds->width,
>+             mOriginalBounds->height, PR_TRUE);


Ignore this whitespace change.	I totally misread that part of the code.
I just tested the patch on my multi-monitor Windows 2000 system.
I'm seeing two problems.

1.  It always hides the taskbar, regardless of whether Mozilla is going
fullscreen on the same screen as the taskbar.

2.  When it is going fullscreen on the same screen as the taskbar, it hides the
taskbar but does not take up the space the taskbar was occupying, leaving the
desktop visible there.
Did you exclude the part of the patch in comment 36?  I'm not sure if that's 
related or not, but it's a good place to start.  If you did, I can look at 
this when I get back from holidays.
After having an e-mail discussion with Dean Tessman, he told me to report my
findings here.

It looks like Mozilla's method of going fullscreen is flawed.  It hides the
taskbar in a bad way, and the OS isn't aware of what's going on.  If Mozilla
crashes or hangs, the taskbar remains hidden, but it's still there reserving its
space.  You can see this by maximizing another window.  It will leave that space
empty.

With Dean's patch, the available area on the current monitor is used, which of
course doesn't include the reserved taskbar space.  Then there's still the
problem of the taskbar being hidden even if the Mozilla window is on another
monitor.

IE doesn't hide the taskbar at all.  It sets itself as always on top and takes
the full screen dimensions instead of the available space.  When it loses focus,
it turns "always on top" back off, much like Mozilla currently unhides the
taskbar when it loses focus.

Mozilla should probably go about doing this the same way IE currently does.  Not
only does it resolve the issue of the taskbar hiding when it shouldn't, it also
deals with any unknown windows docked to the side of the screen, like the
taskbar does, from third-party applications like ICQ.
Let us not forget that this is a Linux issue too.
This bug has Windows marked as the OS.  If the current patch does not already
fix the issue in Linux, we probably need a seperate bug, as someone on Linux
will have to take a look at it.  If the current patch works perfectly on Linux,
then the only work left for the next version of the patch is Windows-specific,
so just sit tight.
I can only hope that any patch that fixes this issue in windows will also it for
Linux too. But I have my doubts...

I'm following this bug because my original bug, which was described as a bug in
mozilla for Linux, was flagged as a duplicate of this one.

Perhaps it would be a good idea to create a separate bug for this issue under Linux.
burpmaster: thinking about your investigations in comment 39 a little more, I
think you should file a separate bug on changing how we do full-screen on Windows.

I'm going to do up a new patch here in the next day or so that should hopefully
address the multi-monitor problem on all platforms.  burpmaster will (if the
offer's still good) test it for me on Windows before I post it here.
Attached patch patch v2 (obsolete) — Splinter Review
Burpmaster says this works on his multi-monitor Win2K setup.  Can someone
running dual monitors under Linux try it?
Attachment #109508 - Attachment is obsolete: true
Comment on attachment 115359 [details] [diff] [review]
patch v2

This fixes the problem on Windows, can someone with a Linux build environment
and multiple monitors please test this?

In the meantime, Ere any chance of reviewing this?  I won't ask for an sr until
I hear back from a Linux user.
Attachment #115359 - Flags: review?(ere)
Comment on attachment 115359 [details] [diff] [review]
patch v2

Two things: 
1. Maybe I'm just paranoid, but I think you should |if (screenManager)| and
screen before using them as the assertion won't prevent trying to use them. I'd
also check the return values of the called methods.
2. This one is the real problem. I have WinXP with Radeon 7500 and was running
Mozilla on the secondary display. Pressing F11 switched to Mozilla to
fullscreen, but it also caused the taskbar on the primary display to be hidden.
I believe it shouldn't be hidden when it's not on the same display.
Attachment #115359 - Flags: review?(ere) → review-
Thanks Ere, I can add those checks.

As for the task bar disappearing, that's what comment 39 talks about but it's
out of the scope of this bug.  Burpmaster, did you ever file a bug for changing
how we do full screen on Windows?
I just filed bug 195963 for the taskbar issue.  The patch for this bug should be
checked in (when it's ready) because it's an improvement that doesn't make
things any worse, and I think the remaining issue is elsewhere in the code anyway.
Attached patch patch v3Splinter Review
Attachment #115359 - Attachment is obsolete: true
Comment on attachment 116672 [details] [diff] [review]
patch v3

Ere, better?
Attachment #116672 - Flags: review?(ere)
Comment on attachment 116672 [details] [diff] [review]
patch v3

Definitely better :)
r=ere@atp.fi
Attachment #116672 - Flags: review?(ere) → review+
Comment on attachment 116672 [details] [diff] [review]
patch v3

Jag, how about some sr-lovin'?
Attachment #116672 - Flags: superreview?(jaggernaut)
This just makes the window full screen on the monitor it's on right?  And not
across all screens?  Good good.
You are correct, sir.
Attachment #116672 - Flags: superreview?(jaggernaut) → superreview?(hewitt)
Comment on attachment 116672 [details] [diff] [review]
patch v3

sr=jag
Attachment #116672 - Flags: superreview?(hewitt) → superreview+
Comment on attachment 116672 [details] [diff] [review]
patch v3

Aw man, I never checked this in.  Requesting a= for 1.4.  This is a low-impact
fix that gets full screen mode working as expected on multiple monitor setups.
Attachment #116672 - Flags: approval1.4b+
Attachment #116672 - Flags: approval1.4b+ → approval1.4b?
Comment on attachment 116672 [details] [diff] [review]
patch v3

a=sspitzer, it doesn't look like it will affect single screen users.

if you don't have all the platforms to test (linux, mac & windows), maybe you
can ask around on irc to get people to verify.
Attachment #116672 - Flags: approval1.4b? → approval1.4b+
Before I go trolling on IRC, is there somone with a linux or mac build env
paying attention to this bug that can double-check the fix?
Assignee: hewitt → dean_tessman
Status: ASSIGNED → NEW
Really, this is cross-platform code so it _should_ work on all platforms.  If it
doesn't work then it's more likely a bug in that platform's screen rectangle
functions and not this code.
Status: NEW → ASSIGNED
No testers == nobody really wants this fixed...??
I'd really like it fixed, but am on Windows.  =(.  The current state fullscreen
is in now is really bad.

Before, at least it maximized to the first monitor, now it just puts itself in a
100x50 window in the corner.  This is on 1.4a.

Thanks for you hard work, I would really love to see your patch.  I don't think
it could be any worse that the current code, unless it formats the hard disk, etc.
Comment on attachment 116672 [details] [diff] [review]
patch v3

requesting approval for 1.4.  caillon tested this on his single-monitor linux
and fullscreen still works as expected.  burpmaster tested it on his
dual-monitor windows setup with no problem.  seeing as this is xp code, it
should work on all platforms.
Attachment #116672 - Flags: approval1.4?
Comment on attachment 116672 [details] [diff] [review]
patch v3

a=asa (on behalf of drivers) for checkin to 1.4. Please be on the lookout for
any incoming regression reports and be ready to correct problems or back out
the changes.
Attachment #116672 - Flags: approval1.4b+
Attachment #116672 - Flags: approval1.4?
Attachment #116672 - Flags: approval1.4+
dwitte checked this in for me.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 188436 has been marked as a duplicate of this bug. ***
Hi, guys, I've tried the 1.4 rc1 and fullscreen mode on my second monitor.  The
new code works much better than before, but there is a strange side effect.

When I enable fullscreen mode on the second monitor, the taskbar (on the first)
disappears.  When I click on the first monitor, it reappears.  It is not a big
problem, but certainly annoying as it flickers on and off.

I'm on Win XP, BTW.
That last issue is covered in bug 195963.
*** Bug 151816 has been marked as a duplicate of this bug. ***
Keywords: helpwanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: