Package: mutter-common
Version: 3.4.1-5
Severity: normal
Dear Maintainer,
Please backport the fix for the bug know upstream as: 677657[0], it
would be great if it could be included in Wheezy.
[0] https://bugzilla.gnome.org/show_bug.cgi?id=677657
>From one of the commits that fixed the issue:
*If a window has its BoundingRegion shaped, we shouldn't unredirect it,
as it expects the rest of the windows from being shown under it. This
prevents applications like the Skype screen recorder or gtkRecordMyDesktop
which want to show a "border" around the recorded area from being
unredirected, giving the appearance of making the desktop freeze.*
Upstream made a little software to reproduce/test the bug
shaped-fullscreen.c[1], that is attached and you can build it with:
$ gcc -o shaped-fullscreen shaped-fullscreen.c $(pkg-config --cflags --libs
gtk+-3.0) -Wall -Werror
[1] https://bugzilla.gnome.org/show_bug.cgi?id=677657#c10
The fix was pushed to the upstream git repository here:
http://git.gnome.org/browse/mutter/commit/?id=4041f96ed3699e25e17bb0fac5c9e0b2c3b04675
http://git.gnome.org/browse/mutter/commit/?id=66eac7824a7eb70fdd90109b763e59b70a13739b
I have imported the patches to the current version of the package in Sid:
02_meta-window-actor_unredirect.patch (Hunk #1 succeeded at 1219 (offset 31
lines))
03_meta-window-actor_do_not_unredirect_shaped_windows.patch (Hunk #1 succeeded
at 1233 (offset 31 lines))
and you can find them attached.
Thanks for your work in Debian.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_GT.utf8, LC_CTYPE=es_GT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages mutter-common depends on:
ii dconf-gsettings-backend [gsettings-backend] 0.12.1-2
mutter-common recommends no packages.
mutter-common suggests no packages.
-- no debconf information
>From 4041f96ed3699e25e17bb0fac5c9e0b2c3b04675 Mon Sep 17 00:00:00 2001
From: Jasper St. Pierre <[email protected]>
Date: Fri, 08 Jun 2012 03:27:08 +0000
Subject: meta-window-actor: Refactor should_unredirect a bit more
"Flat is better than nested"
https://bugzilla.gnome.org/show_bug.cgi?id=677657
---
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1219,31 +1219,33 @@
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
MetaScreen *screen = meta_window_get_screen (metaWindow);
MetaWindowActorPrivate *priv = self->priv;
+ int screen_width, screen_height;
+ MetaRectangle window_rect, monitor_rect;
+ int num_monitors = meta_screen_get_n_monitors (screen);
+ int i;
- if (meta_window_is_override_redirect (metaWindow) && priv->opacity == 0xff && !priv->argb32)
+ if (!meta_window_is_override_redirect (metaWindow))
+ return FALSE;
+
+ if (priv->opacity != 0xff)
+ return FALSE;
+
+ if (priv->argb32)
+ return FALSE;
+
+ meta_screen_get_size (screen, &screen_width, &screen_height);
+ meta_window_get_outer_rect (metaWindow, &window_rect);
+
+ if (window_rect.x == 0 && window_rect.y == 0 &&
+ window_rect.width == screen_width && window_rect.height == screen_height)
+ return TRUE;
+
+ for (i = 0; i < num_monitors; i++)
{
- int screen_width, screen_height;
- MetaRectangle window_rect;
- meta_screen_get_size (screen, &screen_width, &screen_height);
- meta_window_get_outer_rect (metaWindow, &window_rect);
-
- if (window_rect.x == 0 && window_rect.y == 0 &&
- window_rect.width == screen_width && window_rect.height == screen_height)
- return TRUE;
- else
- {
- int num_monitors = meta_screen_get_n_monitors (screen);
- int i;
- MetaRectangle monitor_rect;
-
- for (i = 0; i < num_monitors; i++)
- {
- meta_screen_get_monitor_geometry (screen , i, &monitor_rect);
- if (monitor_rect.x == window_rect.x && monitor_rect.y == window_rect.y &&
- monitor_rect.width == window_rect.width && monitor_rect.height == window_rect.height)
- return TRUE;
- }
- }
+ meta_screen_get_monitor_geometry (screen , i, &monitor_rect);
+ if (monitor_rect.x == window_rect.x && monitor_rect.y == window_rect.y &&
+ monitor_rect.width == window_rect.width && monitor_rect.height == window_rect.height)
+ return TRUE;
}
return FALSE;
/* gcc -o shaped-fullscreen shaped-fullscreen.c $(pkg-config --cflags --libs gtk+-3.0) -Wall -Werror */
#include <gtk/gtk.h>
int
main (int argc,
char **argv)
{
int w, h;
GtkWidget *window;
GdkWindow *gdk_window;
cairo_rectangle_int_t rect;
cairo_region_t *region;
gtk_init (&argc, &argv);
w = gdk_screen_width ();
h = gdk_screen_height ();
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_show (window);
gdk_window = gtk_widget_get_window (window);
gdk_window_move_resize (gdk_window, 0, 0, w, h);
rect.x = 0;
rect.y = 0;
rect.width = w;
rect.height = h;
region = cairo_region_create_rectangle (&rect);
#define BORDER 4
rect.x += BORDER;
rect.y += BORDER;
rect.width -= BORDER * 2;
rect.height -= BORDER * 2;
cairo_region_subtract_rectangle (region, &rect);
gdk_window_shape_combine_region (gdk_window, region, 0, 0);
cairo_region_destroy (region);
gtk_main ();
return 0;
}
>From 66eac7824a7eb70fdd90109b763e59b70a13739b Mon Sep 17 00:00:00 2001
From: Jasper St. Pierre <[email protected]>
Date: Fri, 08 Jun 2012 03:31:21 +0000
Subject: meta-window-actor: Don't unredirect shaped windows
If a window has its BoundingRegion shaped, we shouldn't unredirect it,
as it expects the rest of the windows from being shown under it. This
prevents applications like the Skype screen recorder or gtkRecordMyDesktop
which want to show a "border" around the recorded area from being
unredirected, giving the appearance of making the desktop freeze.
https://bugzilla.gnome.org/show_bug.cgi?id=677657
---
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1233,6 +1233,9 @@
if (priv->argb32)
return FALSE;
+ if (metaWindow->has_shape)
+ return FALSE;
+
meta_screen_get_size (screen, &screen_width, &screen_height);
meta_window_get_outer_rect (metaWindow, &window_rect);