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 627880 - Steam windows appear tiled in many copies on screen with compositing enabled
Steam windows appear tiled in many copies on screen with compositing enabled
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: Owen Taylor
mutter-maint
: 653400 (view as bug list)
Depends on: 635268
Blocks:
 
 
Reported: 2010-08-24 19:41 UTC by Javier Kohen
Modified: 2012-04-25 21:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Multiple copies (99.90 KB, image/jpeg)
2010-08-24 19:41 UTC, Javier Kohen
  Details
Clip the shaped region to the bounding region (1.10 KB, patch)
2011-05-15 04:22 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
Clip the shaped region to the bounding region (2.81 KB, patch)
2011-06-30 18:29 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
Clip the shaped region to the bounding region (2.82 KB, patch)
2011-06-30 18:37 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
Clip the shaped region to the bounding region (2.80 KB, patch)
2011-06-30 18:52 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Javier Kohen 2010-08-24 19:41:41 UTC
Created attachment 168677 [details]
Multiple copies

Note: I originally reported this in the Wine bug tracker. I was told it's
likely that the cause is a bug in the window manager, and there's some evidence
to support that. Please see the discussion in
http://bugs.winehq.org/show_bug.cgi?id=23841

The "new" Steam UI running under Wine has a weird effect when run along with a
compositing window manager. Instead of one copy of the window, multiple copies
appear tiled to the right and down. Only the top-left copy is "solid" in the
sense that it's the only one that receives events. Clicking on a copy sends the
events to the window below (another application or the desktop). All copies
reproduce the changes in the main copy.

I've reproduced this with Gnome-Shell, plain Mutter, and Metacity in
compositing mode. Metacity with compositing mode disabled doesn't exhibit this
problem.

I'm attaching a screeshot made with Gnome Shell. Metacity shows a different
effect: instead of the extra copies, it shows filled black.

Curiously in the "expose" mode of Gnome Shell (i.e. when the desktop is zoomed
out) the window appears correctly. I haven't tried similar features of the
other window managers.
Comment 1 Owen Taylor 2010-08-24 20:01:10 UTC
Have you tried with Compiz?

Metacity in compositing mode shares almost no code with Mutter, so it's almost certain that you are revealing a video driver bug of some sort. (You don't say anything about your video driver or graphics hardware.)
Comment 2 Javier Kohen 2010-08-24 20:04:36 UTC
I'm using nVidia's proprietary drivers 195.36.24-4 with a 9800 GTX+ card.

I haven't tried with Compiz, but I can try to do that tomorrow. Just to make sure what you have in mind, are you suggesting that if it also happens with Compiz, then it's unlikely to be caused by the window manager?
Comment 3 Owen Taylor 2010-08-24 20:30:49 UTC
If it also happens with Compiz it is not caused by the window manager.
Comment 4 Javier Kohen 2010-08-24 20:38:49 UTC
I've just confirmed that it doesn't happen with Compiz 0.8.4-4.
Comment 5 Owen Taylor 2010-08-24 21:06:37 UTC
OK, good to know. It's still almost certainly a driver bug or possibly a Wine bug, though.
Comment 6 Jonathan Strander 2011-01-22 18:36:39 UTC
I can reproduce this behavior. Different hardware/driver version though still NVIDIA. If someone has nouveau supported hardware and tested we could see if it's something in the driver.

Interesting that it doesn't happen in the overview.
Comment 7 Jasper St. Pierre (not reading bugmail) 2011-05-15 04:22:36 UTC
Created attachment 187834 [details] [review]
Clip the shaped region to the bounding region

According to the XShape specification, the shaped region should always be
a subset of the bounding region. Certain programs such as wine depended
on this behavior.
Comment 8 Jasper St. Pierre (not reading bugmail) 2011-05-26 01:31:13 UTC
Unfortunately, XShape broke recently... so this patch requires bug #635268 to be fixed.
Comment 9 Jasper St. Pierre (not reading bugmail) 2011-06-25 16:22:37 UTC
*** Bug 653400 has been marked as a duplicate of this bug. ***
Comment 10 Owen Taylor 2011-06-30 17:58:26 UTC
Review of attachment 187834 [details] [review]:

This doesn't handle the case of the bounding rectangle changing without the shape changing - so we might leave the shape clipped to the last bounding rectangle. Now, it really should work fine right now since we set the "needs_pixmap" flag in meta_window_actor_sync_actor_position() which gets called synchronously, and we set the needs_shape flag when we get events back from the X server, and we (right now) always set a new shape when we set a new size, but with the changes planned for the "invisible borders" patch, we'll then be tracking a shape that's set by the application whenever it wants, and is unconnected to setting a new size.

So, I think meta_window_actor_update_bounding_region() needs a:

 if (priv->shaped)
    meta_window_actor_update_shape();

with an appropriate comment.

::: src/compositor/meta-window-actor.c
@@ +1713,3 @@
+
+  if (priv->bounding_region != NULL)
+    cairo_region_intersect (priv->shape_region, priv->bounding_region);

I'd like to see a comment here along the lines of 

 /* shape_region here is the "bounding region" as defined in the
  * X SHAPE extension, while bounding_region is the "bounding
  * rectangle" in the shape extension. All shape regions set
  * via SHAPE are implicitly clipped to the bounding rectangle
  * when used inside the X server, but not when retrieved, so
  * we need to do that that clip explicitly here */
Comment 11 Jasper St. Pierre (not reading bugmail) 2011-06-30 18:29:10 UTC
Created attachment 191050 [details] [review]
Clip the shaped region to the bounding region

According to the XShape specification, the shaped region should always be
a subset of the bounding region. Certain programs such as wine depended
on this behavior.
Comment 12 Owen Taylor 2011-06-30 18:36:24 UTC
Review of attachment 191050 [details] [review]:

Minor nits, otherwise looks good to commit

::: src/compositor/meta-window-actor.c
@@ +1699,3 @@
+       */
+    
+      meta_window_actor_invalidate_shadow (self);

Extra blank line above this

@@ +1723,3 @@
+
+  /* Our "shape_region" is called the "bounding region" in the X Shape
+   * Extension Documentation[0].

Broken link... (Not sure a bibliographic entry is needed - someone can find it if they need it :-)

@@ +1730,3 @@
+   * The X Shape extension requires that the "bounding region" can never
+   * extend outside the "bounding rectangle", and says it must be implicitly
+   * clipped before rendering, so the region we get back hasn't been clipped.

Not sure there's a ", so" here - would be fine as "rendering. The region..."
Comment 13 Jasper St. Pierre (not reading bugmail) 2011-06-30 18:37:11 UTC
Created attachment 191053 [details] [review]
Clip the shaped region to the bounding region

According to the XShape specification, the shaped region should always be
a subset of the bounding region. Certain programs such as wine depended
on this behavior.



grr... fix a compile issue that I forgot to squash
Comment 14 Jasper St. Pierre (not reading bugmail) 2011-06-30 18:52:06 UTC
Created attachment 191055 [details] [review]
Clip the shaped region to the bounding region

According to the XShape specification, the shaped region should always be
a subset of the bounding region. Certain programs such as wine depended
on this behavior.



This good?
Comment 15 Jasper St. Pierre (not reading bugmail) 2011-06-30 20:35:38 UTC
Attachment 191055 [details] pushed as 2b93c19 - Clip the shaped region to the bounding region
Comment 16 Jasper St. Pierre (not reading bugmail) 2011-06-30 20:40:09 UTC
Oops. Did not mean to change this to fixed.

John or Javien -- can you look at Steam and verify that the situation is better, and note any additional bugs you have?
Comment 17 jonhanger 2011-10-23 21:57:07 UTC
On which file should the patch be applied and where is it located? I've got Gnome 3 from the F15 installation, I didn't compile it from source.
Comment 18 Jasper St. Pierre (not reading bugmail) 2011-10-23 22:20:36 UTC
You need to build from source if you want to apply this patch.
Comment 19 jonhanger 2011-10-23 22:43:41 UTC
Alright. What's the procedure to set the compiled-from-source Gnome shell as the default, and will it cause some dependencies to break on F15?
Comment 20 Jasper St. Pierre (not reading bugmail) 2011-10-23 23:14:13 UTC
(In reply to comment #19)
> Alright. What's the procedure to set the compiled-from-source Gnome shell as
> the default, and will it cause some dependencies to break on F15?

The most sane option is to build with jhbuild, or upgrade to F16 beta.

To do the former, see http://live.gnome.org/GnomeShell#Building
To do the latter, see http://fedoraproject.org/wiki/Upgrading
Comment 21 jonhanger 2011-10-23 23:24:43 UTC
Cool! Thanks so much for your help!
Comment 22 Jasper St. Pierre (not reading bugmail) 2012-04-25 21:52:36 UTC
Confirmed fixed.