After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614509 - Fix panel visibility for multiscreen configurations
Fix panel visibility for multiscreen configurations
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 609425 613701 617165 (view as bug list)
Depends on:
Blocks: randr-tracker
 
 
Reported: 2010-03-31 21:08 UTC by drago01
Modified: 2012-08-23 18:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[chrome] Fix fullscreen behaviour (1.65 KB, patch)
2010-03-31 21:09 UTC, drago01
committed Details | Review
chrome: Fix fullscreen for broken apps (1.41 KB, patch)
2010-04-03 14:56 UTC, drago01
reviewed Details | Review
chrome: Fix fullscreen for broken apps (1.46 KB, patch)
2010-04-03 15:50 UTC, drago01
committed Details | Review

Description drago01 2010-03-31 21:08:48 UTC
The check in chrome.js is still wrong, see patch for fix.
Comment 1 drago01 2010-03-31 21:09:17 UTC
Created attachment 157638 [details] [review]
[chrome] Fix fullscreen behaviour

The check in _windowsRestacked checks for
windows[i].x >= primary.x
and
windows[i].x <= primary.x + primary.width
(likewise for y).

This is wrong because a fullscreen window on the secondary screen is likely
to have windows[i].x == primary.x + primary.width which means that the checks
for _both_ screens would be valid, but the first one would win due to
the "break;" statement.

But here the window isn't really on the primary but on the secondary one.

Fix that by using < instead of <= for those checks.
Comment 2 drago01 2010-04-03 14:56:44 UTC
Created attachment 157826 [details] [review]
chrome: Fix fullscreen for broken apps

The fullscreen check in chrome.js still fails to detect a case where an app
sets the window coordinates to negative values.

Use Math.abs to work around this nonsense.

(The app in question is npviewer.bin aka flash)
Comment 3 Colin Walters 2010-04-03 15:38:57 UTC
Review of attachment 157826 [details] [review]:

::: js/ui/chrome.js
@@ +210,3 @@
             let layer = windows[i].get_meta_window().get_layer();
+                    Math.abs(windows[i].y) >= primary.y && Math.abs(windows[i].y) < primary.y + primary.height) {
+                if (Math.abs(windows[i].x) >= primary.x && Math.abs(windows[i].x) < primary.x + primary.width &&

Wouldn't we want Math.max(coord, 0), not Math.abs?  Or is it really setting it to the negative of what's expected?
Comment 4 drago01 2010-04-03 15:45:22 UTC
(In reply to comment #3)
> Review of attachment 157826 [details] [review]:
> 
> ::: js/ui/chrome.js
> @@ +210,3 @@
>              let layer = windows[i].get_meta_window().get_layer();
> +                    Math.abs(windows[i].y) >= primary.y &&
> Math.abs(windows[i].y) < primary.y + primary.height) {
> +                if (Math.abs(windows[i].x) >= primary.x &&
> Math.abs(windows[i].x) < primary.x + primary.width &&
> 
> Wouldn't we want Math.max(coord, 0), not Math.abs?  Or is it really setting it
> to the negative of what's expected?

As we window is fullscreen anyway it does not matter what values it uses as long as it is on the same screen, but yeah Math.max(coord, 0) sounds more correct here.
Comment 5 drago01 2010-04-03 15:50:30 UTC
Created attachment 157829 [details] [review]
chrome: Fix fullscreen for broken apps

The fullscreen check in chrome.js still fails to detect a case where an app
sets the window coordinates to negative values.

We just assume 0 when an app sets a negative value to work around this
nonsense.

(The app in question is npviewer.bin aka flash)
Comment 6 Dan Winship 2010-04-06 12:51:30 UTC
Comment on attachment 157829 [details] [review]
chrome: Fix fullscreen for broken apps

So what happens if your primary monitor doesn't start at 0,0, and you fullscreen flash on it? Does it position itself at -1,-1 or at primary.x-1,primary.y-1?

And this is getting confusing enough that we need a comment explaining exactly what it's checking for. Which, at this point, I think is that some apps just set FULLSCREEN and don't change their requested size/position at all, and some resize themselves to screen-sized and position themselves at the monitor's 0,0 position, and some apparently position themselves slightly offscreen (flash).
Comment 7 drago01 2010-04-06 12:54:23 UTC
(In reply to comment #6)
> (From update of attachment 157829 [details] [review])
> So what happens if your primary monitor doesn't start at 0,0, and you
> fullscreen flash on it? Does it position itself at -1,-1 or at
> primary.x-1,primary.y-1?

I does position the window on 0,-24 for whatever reason ...

> And this is getting confusing enough that we need a comment explaining exactly
> what it's checking for.

Yeah makes sense.

> Which, at this point, I think is that some apps just
> set FULLSCREEN and don't change their requested size/position at all, and some
> resize themselves to screen-sized and position themselves at the monitor's 0,0
> position, and some apparently position themselves slightly offscreen (flash).

Yeah this are the 3 cases we check for.
Comment 8 drago01 2010-04-06 19:21:10 UTC
Comment on attachment 157829 [details] [review]
chrome: Fix fullscreen for broken apps

Document fullscreen checks and add a third case to catch apps like
flash who position there windows sightly offscreen to hide there decorations
Comment 9 drago01 2010-04-06 19:21:30 UTC
*** Bug 613701 has been marked as a duplicate of this bug. ***
Comment 10 Jonathan Strander 2010-04-09 00:06:30 UTC
Note that flash is definitely fixed, but EDuke32 (http://eduke32.com/) still shows below the panel when displayed fullscreen. I've traced it to happening only if the game changes the current desktop/display resolution.
Comment 11 Dan Winship 2010-04-29 13:57:56 UTC
*** Bug 617165 has been marked as a duplicate of this bug. ***
Comment 12 drago01 2010-05-13 11:54:22 UTC
*** Bug 609425 has been marked as a duplicate of this bug. ***
Comment 13 Florian Müllner 2012-08-23 18:11:11 UTC
This was fixed, right?