Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please allow the upload of a new mutter version. This will be the last upstream on the 3.14 branch, and it includes only bugfixes and translations, including a requirement for working around the very annoying bug with the proprietary nVidia driver. I think all these fixes are useful, but of course I can upload a targeted fix for the nVidia problem if it’s too much. However, the shlibs bump will remain, since it’s precisely here for the function required by that workaround. 3.14.4 ====== * Fix flash on unredirection [Chris; #743858] * Fix incompatibility with GLES2 GLSL [Alban; #745442] * Add function to refresh all background instances [Rui; #739178] * Fix geometry of shaded windows [Florian; #746145] * Misc. bug fixes [Florian, Rui; #698995, #743217, #743254] Contributors: Alban Browaeys, Rui Matos, Florian Müllner, Chris Wilson Translations: Matej Urbančič [sl], Muhammet Kara [tr], Samir Ribic [bs] 3.14.3 ====== * Fix crash when trying to unredirect a destroyed window [Florian; #740133] * Fix "flicker" during startup transition [Ray; #740377] * Don't leave left-over frames queued [Owen; #738686] * Set CRTC configuration even if it might be redundant [Rui; #740838] Contributors: Rui Matos, Florian Müllner, Jasper St. Pierre, Ray Strode, Owen W. Taylor mutter (3.14.4-1) unstable; urgency=medium * New upstream translation and bugfix release. + Includes new function required for the workaround to #768896 which is very annoying for users of the proprietary nvidia driver. * 10_window-actor_unredirect.patch, 11_black_background.patch: dropped, merged upstream. * Bump shlibs due to new function. unblock mutter/3.14.4-1 Thanks, -- .''`. Josselin Mouette : :' : `. `' `-
diff --git a/NEWS b/NEWS index 73d9cac..9ae8bcb 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,27 @@ +3.14.4 +====== +* Fix flash on unredirection [Chris; #743858] +* Fix incompatibility with GLES2 GLSL [Alban; #745442] +* Add function to refresh all background instances [Rui; #739178] +* Fix geometry of shaded windows [Florian; #746145] +* Misc. bug fixes [Florian, Rui; #698995, #743217, #743254] + +Contributors: + Alban Browaeys, Rui Matos, Florian Müllner, Chris Wilson + +Translations: + Matej Urbančič [sl], Muhammet Kara [tr], Samir Ribic [bs] + +3.14.3 +====== +* Fix crash when trying to unredirect a destroyed window [Florian; #740133] +* Fix "flicker" during startup transition [Ray; #740377] +* Don't leave left-over frames queued [Owen; #738686] +* Set CRTC configuration even if it might be redundant [Rui; #740838] + +Contributors: + Rui Matos, Florian Müllner, Jasper St. Pierre, Ray Strode, Owen W. Taylor + 3.14.2 ====== * Prevent crash applying monitor config for a closed lid [Rui; #739450] diff --git a/configure.ac b/configure.ac index 0870afa..1574857 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.62) m4_define([mutter_major_version], [3]) m4_define([mutter_minor_version], [14]) -m4_define([mutter_micro_version], [2]) +m4_define([mutter_micro_version], [4]) m4_define([mutter_version], [mutter_major_version.mutter_minor_version.mutter_micro_version]) @@ -72,7 +72,7 @@ CLUTTER_PACKAGE=clutter-1.0 MUTTER_PC_MODULES=" gtk+-3.0 >= 3.9.11 - gio-unix-2.0 >= 2.25.10 + gio-unix-2.0 >= 2.35.1 pango >= 1.2.0 cairo >= 1.10.0 gsettings-desktop-schemas >= 3.7.3 diff --git a/po/bs.po b/po/bs.po index c4fa65b..e6bd98b 100644 diff --git a/po/sl.po b/po/sl.po index 7bf391a..bd007c6 100644 diff --git a/po/tr.po b/po/tr.po index d544610..159cd28 100644 diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c index a8ac467..4c1b16c 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.c +++ b/src/backends/x11/meta-monitor-manager-xrandr.c @@ -838,26 +838,12 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager, unsigned int j, n_outputs; int width, height; Status ok; - unsigned long old_controlled_mask; - unsigned long new_controlled_mask; mode = crtc_info->mode; n_outputs = crtc_info->outputs->len; outputs = g_new (XID, n_outputs); - old_controlled_mask = 0; - for (j = 0; j < manager->n_outputs; j++) - { - MetaOutput *output; - - output = &manager->outputs[j]; - - if (output->crtc == crtc) - old_controlled_mask |= 1UL << j; - } - - new_controlled_mask = 0; for (j = 0; j < n_outputs; j++) { MetaOutput *output; @@ -866,21 +852,10 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager, output->is_dirty = TRUE; output->crtc = crtc; - new_controlled_mask |= 1UL << j; outputs[j] = output->winsys_id; } - if (crtc->current_mode == mode && - crtc->rect.x == crtc_info->x && - crtc->rect.y == crtc_info->y && - crtc->transform == crtc_info->transform && - old_controlled_mask == new_controlled_mask) - { - /* No change */ - goto next; - } - ok = XRRSetCrtcConfig (manager_xrandr->xdisplay, manager_xrandr->resources, (XID)crtc->crtc_id, diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index cc542c4..250d489 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -614,6 +614,7 @@ set_unredirected_window (MetaCompositor *compositor, meta_window_actor_set_unredirected (window_actor, FALSE); } + meta_shape_cow_for_window (compositor, window); compositor->unredirected_window = window; if (compositor->unredirected_window != NULL) @@ -621,8 +622,6 @@ set_unredirected_window (MetaCompositor *compositor, MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (compositor->unredirected_window)); meta_window_actor_set_unredirected (window_actor, TRUE); } - - meta_shape_cow_for_window (compositor, compositor->unredirected_window); } void diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c index abc6fda..132494d 100644 --- a/src/compositor/meta-background-actor.c +++ b/src/compositor/meta-background-actor.c @@ -115,7 +115,7 @@ typedef enum { #define FRAGMENT_SHADER_CODE \ "float t = 2.0 * length(position);\n" \ "t = min(t, 1.0);\n" \ -"float pixel_brightness = 1 - t * vignette_sharpness;\n" \ +"float pixel_brightness = 1.0 - t * vignette_sharpness;\n" \ "cogl_color_out.rgb = cogl_color_out.rgb * pixel_brightness;\n" \ typedef struct _MetaBackgroundLayer MetaBackgroundLayer; diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c index 0370f55..75fbc28 100644 --- a/src/compositor/meta-background.c +++ b/src/compositor/meta-background.c @@ -71,6 +71,8 @@ enum G_DEFINE_TYPE (MetaBackground, meta_background, G_TYPE_OBJECT) +static GSList *all_backgrounds = NULL; + static void free_fbos (MetaBackground *self) { @@ -291,6 +293,8 @@ meta_background_dispose (GObject *object) static void meta_background_finalize (GObject *object) { + all_backgrounds = g_slist_remove (all_backgrounds, object); + G_OBJECT_CLASS (meta_background_parent_class)->finalize (object); } @@ -333,6 +337,7 @@ meta_background_init (MetaBackground *self) self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, META_TYPE_BACKGROUND, MetaBackgroundPrivate); + all_backgrounds = g_slist_prepend (all_backgrounds, self); } static void @@ -899,3 +904,12 @@ meta_background_set_blend (MetaBackground *self, free_wallpaper_texture (self); mark_changed (self); } + +void +meta_background_refresh_all (void) +{ + GSList *l; + + for (l = all_backgrounds; l; l = l->next) + mark_changed (l->data); +} diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index eb21c46..3d6fab1 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -100,7 +100,7 @@ struct _MetaWindowActorPrivate guint disposed : 1; /* If set, the client needs to be sent a _NET_WM_FRAME_DRAWN - * client message using the most recent frame in ->frames */ + * client message for one or more messages in ->frames */ guint needs_frame_drawn : 1; guint repaint_scheduled : 1; @@ -118,10 +118,21 @@ struct _MetaWindowActorPrivate typedef struct _FrameData FrameData; +/* Each time the application updates the sync request counter to a new even value + * value, we queue a frame into the windows list of frames. Once we're painting + * an update "in response" to the window, we fill in frame_counter with the + * Cogl counter for that frame, and send _NET_WM_FRAME_DRAWN at the end of the + * frame. _NET_WM_FRAME_TIMINGS is sent when we get a frame_complete callback. + * + * As an exception, if a window is completely obscured, we try to throttle drawning + * to a slower frame rate. In this case, frame_counter stays -1 until + * send_frame_message_timeout() runs, at which point we send both the + * _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS messages. + */ struct _FrameData { - int64_t frame_counter; guint64 sync_request_serial; + int64_t frame_counter; gint64 frame_drawn_time; }; @@ -656,6 +667,30 @@ clip_shadow_under_window (MetaWindowActor *self) } static void +assign_frame_counter_to_frames (MetaWindowActor *self) +{ + MetaWindowActorPrivate *priv = self->priv; + GList *l; + + /* If the window is obscured, then we're expecting to deal with sending + * frame messages in a timeout, rather than in this paint cycle. + */ + if (priv->send_frame_messages_timer != 0) + return; + + for (l = priv->frames; l; l = l->next) + { + FrameData *frame = l->data; + + if (frame->frame_counter == -1) + { + CoglOnscreen *onscreen = COGL_ONSCREEN (cogl_get_draw_framebuffer()); + frame->frame_counter = cogl_onscreen_get_frame_counter (onscreen); + } + } +} + +static void meta_window_actor_paint (ClutterActor *actor) { MetaWindowActor *self = META_WINDOW_ACTOR (actor); @@ -671,6 +706,8 @@ meta_window_actor_paint (ClutterActor *actor) { g_source_remove (priv->send_frame_messages_timer); priv->send_frame_messages_timer = 0; + + assign_frame_counter_to_frames (self); } if (shadow != NULL) @@ -873,16 +910,27 @@ send_frame_messages_timeout (gpointer data) { MetaWindowActor *self = (MetaWindowActor *) data; MetaWindowActorPrivate *priv = self->priv; - FrameData *frame = g_slice_new0 (FrameData); + GList *l; - frame->sync_request_serial = priv->window->sync_request_serial; + for (l = priv->frames; l;) + { + GList *l_next = l->next; + FrameData *frame = l->data; - do_send_frame_drawn (self, frame); - do_send_frame_timings (self, frame, 0, 0); + if (frame->frame_counter == -1) + { + do_send_frame_drawn (self, frame); + do_send_frame_timings (self, frame, 0, 0); + + priv->frames = g_list_delete_link (priv->frames, l); + frame_data_free (frame); + } + + l = l_next; + } priv->needs_frame_drawn = FALSE; priv->send_frame_messages_timer = 0; - frame_data_free (frame); return FALSE; } @@ -891,6 +939,10 @@ static void queue_send_frame_messages_timeout (MetaWindowActor *self) { MetaWindowActorPrivate *priv = self->priv; + + if (priv->send_frame_messages_timer != 0) + return; + MetaDisplay *display = meta_window_get_display (priv->window); gint64 current_time = meta_compositor_monotonic_time_to_server_time (display, g_get_monotonic_time ()); MetaMonitorManager *monitor_manager = meta_monitor_manager_get (); @@ -933,6 +985,7 @@ meta_window_actor_queue_frame_drawn (MetaWindowActor *self, return; frame = g_slice_new0 (FrameData); + frame->frame_counter = -1; priv->needs_frame_drawn = TRUE; @@ -1905,24 +1958,12 @@ meta_window_actor_handle_updates (MetaWindowActor *self) void meta_window_actor_pre_paint (MetaWindowActor *self) { - MetaWindowActorPrivate *priv = self->priv; - GList *l; - if (meta_window_actor_is_destroyed (self)) return; meta_window_actor_handle_updates (self); - for (l = priv->frames; l != NULL; l = l->next) - { - FrameData *frame = l->data; - - if (frame->frame_counter == 0) - { - CoglOnscreen *onscreen = COGL_ONSCREEN (cogl_get_draw_framebuffer()); - frame->frame_counter = cogl_onscreen_get_frame_counter (onscreen); - } - } + assign_frame_counter_to_frames (self); } static void @@ -1963,16 +2004,23 @@ meta_window_actor_post_paint (MetaWindowActor *self) if (meta_window_actor_is_destroyed (self)) return; - /* This window had damage, but wasn't actually redrawn because - * it is obscured. So we should wait until timer expiration - * before sending _NET_WM_FRAME_* messages. - */ - if (priv->send_frame_messages_timer != 0) - return; - - if (priv->needs_frame_drawn) + /* If the window had damage, but wasn't actually redrawn because + * it is obscured, we should wait until timer expiration before + * sending _NET_WM_FRAME_* messages. + */ + if (priv->send_frame_messages_timer == 0 && + priv->needs_frame_drawn) { - do_send_frame_drawn (self, priv->frames->data); + GList *l; + + for (l = priv->frames; l; l = l->next) + { + FrameData *frame = l->data; + + if (frame->frame_drawn_time == 0) + do_send_frame_drawn (self, frame); + } + priv->needs_frame_drawn = FALSE; } @@ -2057,15 +2105,20 @@ meta_window_actor_frame_complete (MetaWindowActor *self, { GList *l_next = l->next; FrameData *frame = l->data; + gint64 frame_counter = cogl_frame_info_get_frame_counter (frame_info); - if (frame->frame_counter == cogl_frame_info_get_frame_counter (frame_info)) + if (frame->frame_counter != -1 && frame->frame_counter <= frame_counter) { - if (frame->frame_drawn_time != 0) - { - priv->frames = g_list_delete_link (priv->frames, l); - send_frame_timings (self, frame, frame_info, presentation_time); - frame_data_free (frame); - } + if (G_UNLIKELY (frame->frame_drawn_time == 0)) + g_warning ("%s: Frame has assigned frame counter but no frame drawn time", + priv->window->desc); + if (G_UNLIKELY (frame->frame_counter < frame_counter)) + g_warning ("%s: frame_complete callback never occurred for frame %" G_GINT64_FORMAT, + priv->window->desc, frame->frame_counter); + + priv->frames = g_list_delete_link (priv->frames, l); + send_frame_timings (self, frame, frame_info, presentation_time); + frame_data_free (frame); } l = l_next; diff --git a/src/core/display.c b/src/core/display.c index 185452b..29242fa 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1214,7 +1214,7 @@ meta_grab_op_is_moving (MetaGrabOp op) if (!grab_op_is_window (op)) return FALSE; - return (op & META_GRAB_OP_WINDOW_DIR_MASK) == 0; + return !meta_grab_op_is_resizing (op); } /** diff --git a/src/core/place.c b/src/core/place.c index 665e444..56befbd 100644 --- a/src/core/place.c +++ b/src/core/place.c @@ -779,7 +779,8 @@ meta_window_place (MetaWindow *window, if (w != window && meta_window_showing_on_its_workspace (w) && - meta_window_located_on_workspace (w, window->workspace)) + (window->on_all_workspaces || + meta_window_located_on_workspace (w, window->workspace))) windows = g_list_prepend (windows, w); tmp = tmp->next; diff --git a/src/meta/meta-background.h b/src/meta/meta-background.h index 38706dc..aa7c707 100644 --- a/src/meta/meta-background.h +++ b/src/meta/meta-background.h @@ -57,6 +57,8 @@ struct _MetaBackground MetaBackgroundPrivate *priv; }; +void meta_background_refresh_all (void); + GType meta_background_get_type (void); MetaBackground *meta_background_new (MetaScreen *screen); diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 1dca3e3..1e2580c 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -1073,9 +1073,10 @@ meta_window_x11_move_resize_internal (MetaWindow *window, /* Compute new frame size */ new_w = window->rect.width + borders.invisible.left + borders.invisible.right; - new_h = borders.invisible.top + borders.invisible.bottom; - if (!window->shaded) - new_h += window->rect.height; + if (window->shaded) + new_h = borders.total.top + borders.total.bottom; + else + new_h = window->rect.height + borders.invisible.top + borders.invisible.bottom; if (new_w != window->frame->rect.width || new_h != window->frame->rect.height) @@ -1684,7 +1685,7 @@ meta_window_x11_update_input_region (MetaWindow *window) /* Translate the set of XShape rectangles that we * get from the X server to a cairo_region. */ XRectangle *rects = NULL; - int n_rects, ordering; + int n_rects = -1, ordering; meta_error_trap_push (window->display); rects = XShapeGetRectangles (window->display->xdisplay, @@ -1694,21 +1695,46 @@ meta_window_x11_update_input_region (MetaWindow *window) &ordering); meta_error_trap_pop (window->display); - /* XXX: The x shape extension doesn't provide a way to only test if an - * input shape has been specified, so we have to query and throw away the - * rectangles. */ - if (rects) - { - if (n_rects > 1 || - (n_rects == 1 && - (rects[0].x != 0 || - rects[0].y != 0 || - rects[0].width != priv->client_rect.width || - rects[0].height != priv->client_rect.height))) - region = region_create_from_x_rectangles (rects, n_rects); + /* XXX: The X Shape specification is quite unfortunately specified. + * + * By default, the window has a shape the same as its bounding region, + * which we consider "NULL". + * + * If the window sets an empty region, then we'll get n_rects as 0 + * and rects as NULL, which we need to transform back into an empty + * region. + * + * It would be great to have a less-broken extension for this, but + * hey, it's X11! + */ - XFree (rects); + if (n_rects == -1) + { + /* We had an error. */ + region = NULL; + } + else if (n_rects == 0) + { + /* Client set an empty region. */ + region = cairo_region_create (); + } + else if (n_rects == 1 && + (rects[0].x == 0 || + rects[0].y == 0 || + rects[0].width == priv->client_rect.width || + rects[0].height == priv->client_rect.height)) + { + /* This is the bounding region case. Keep the + * region as NULL. */ + region = NULL; + } + else + { + /* Window has a custom shape. */ + region = region_create_from_x_rectangles (rects, n_rects); } + + meta_XFree (rects); } if (region != NULL)
Index: debian/changelog =================================================================== --- debian/changelog (révision 44181) +++ debian/changelog (révision 44182) @@ -1,3 +1,14 @@ +mutter (3.14.4-1) unstable; urgency=medium + + * New upstream translation and bugfix release. + + Includes new function required for the workaround to #768896 which + is very annoying for users of the proprietary nvidia driver. + * 10_window-actor_unredirect.patch, 11_black_background.patch: + dropped, merged upstream. + * Bump shlibs due to new function. + + -- Josselin Mouette <j...@debian.org> Thu, 26 Mar 2015 21:06:28 +0100 + mutter (3.14.2-1) unstable; urgency=medium * New upstream bugfix release. Index: debian/patches/10_window-actor_unredirect.patch =================================================================== Index: debian/patches/11_black_background.patch =================================================================== Index: debian/patches/series =================================================================== --- debian/patches/series (révision 44181) +++ debian/patches/series (révision 44182) @@ -1,3 +1 @@ 01_Wcast-align.patch -10_window-actor_unredirect.patch -11_black_background.patch Index: debian/rules =================================================================== --- debian/rules (révision 44181) +++ debian/rules (révision 44182) @@ -15,6 +15,7 @@ --enable-compile-warnings=yes DEB_INSTALL_DOCS_mutter += doc/theme-format.txt DEB_DH_GIREPOSITORY_ARGS_ALL := /usr/lib/mutter +DEB_DH_MAKESHLIBS_ARGS_libmutter0e = -V'libmutter0e (>= 3.14.4)' LDFLAGS += -Wl,-O1 -Wl,--as-needed # This does not work with mutter; disabled, for now.