Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
2f74ecd469 | |||
53a9411255 | |||
989ec7fc60 | |||
c72efc90cb | |||
e7430a4535 | |||
2292458f5e | |||
d62491f46e | |||
8f7a36c53f | |||
8d7ae52565 | |||
cffd2a658b |
15
NEWS
15
NEWS
@ -1,3 +1,18 @@
|
||||
3.21.3
|
||||
======
|
||||
* Don't create invalid UTF-8 window description strings [Rui; #765535]
|
||||
* Convert window titles and wm_class to UTF-8 [Rui; #752788]
|
||||
* Communicate tiled state to GTK+ on wayland [Olivier; #766860]
|
||||
* Use kill() to force-quit unresponsive wayland clients [Olivier; #767464]
|
||||
* Fix window position when unmaximizing via DND on wayland [Olivier; #764180]
|
||||
* Avoid full window redraws when using extended frame sync [Florian; #767798]
|
||||
|
||||
Contributors:
|
||||
Olivier Fourdan, Rui Matos, Florian Müllner
|
||||
|
||||
Translations:
|
||||
Cédric Valmary [oc]
|
||||
|
||||
3.21.2
|
||||
======
|
||||
* Clean up surface <-> shell interaction [Jonas; #763431]
|
||||
|
@ -2,7 +2,7 @@ AC_PREREQ(2.62)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [21])
|
||||
m4_define([mutter_micro_version], [2])
|
||||
m4_define([mutter_micro_version], [3])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
6
po/oc.po
6
po/oc.po
@ -6,9 +6,9 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&"
|
||||
"keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2016-04-29 13:18+0000\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=mutter&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2016-05-20 13:48+0000\n"
|
||||
"PO-Revision-Date: 2016-05-08 18:48+0200\n"
|
||||
"Last-Translator: Cédric Valmary (totenoc.eu) <cvalmary@yahoo.fr>\n"
|
||||
"Language-Team: Tot En Òc\n"
|
||||
|
@ -47,7 +47,7 @@ typedef struct _MetaStagePrivate MetaStagePrivate;
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (MetaStage, meta_stage, CLUTTER_TYPE_STAGE);
|
||||
|
||||
static MetaOverlay *
|
||||
meta_overlay_new ()
|
||||
meta_overlay_new (void)
|
||||
{
|
||||
MetaOverlay *overlay;
|
||||
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
|
@ -25,7 +25,7 @@ struct _MetaSurfaceActorPrivate
|
||||
cairo_region_t *input_region;
|
||||
|
||||
/* Freeze/thaw accounting */
|
||||
guint needs_damage_all : 1;
|
||||
cairo_region_t *pending_damage;
|
||||
guint frozen : 1;
|
||||
};
|
||||
|
||||
@ -261,9 +261,8 @@ meta_surface_actor_process_damage (MetaSurfaceActor *self,
|
||||
* here on the off chance that this will stop the corresponding
|
||||
* texture_from_pixmap from being update.
|
||||
*
|
||||
* needs_damage_all tracks that some unknown damage happened while the
|
||||
* window was frozen so that when the window becomes unfrozen we can
|
||||
* issue a full window update to cover any lost damage.
|
||||
* pending_damage tracks any damage that happened while the window was
|
||||
* frozen so that when can apply it when the window becomes unfrozen.
|
||||
*
|
||||
* It should be noted that this is an unreliable mechanism since it's
|
||||
* quite likely that drivers will aim to provide a zero-copy
|
||||
@ -271,7 +270,12 @@ meta_surface_actor_process_damage (MetaSurfaceActor *self,
|
||||
* any drawing done to the window is always immediately reflected in the
|
||||
* texture regardless of damage event handling.
|
||||
*/
|
||||
priv->needs_damage_all = TRUE;
|
||||
cairo_rectangle_int_t rect = { .x = x, .y = y, .width = width, .height = height };
|
||||
|
||||
if (!priv->pending_damage)
|
||||
priv->pending_damage = cairo_region_create_rectangle (&rect);
|
||||
else
|
||||
cairo_region_union_rectangle (priv->pending_damage, &rect);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -332,16 +336,21 @@ meta_surface_actor_set_frozen (MetaSurfaceActor *self,
|
||||
|
||||
priv->frozen = frozen;
|
||||
|
||||
if (!frozen && priv->needs_damage_all)
|
||||
if (!frozen && priv->pending_damage)
|
||||
{
|
||||
/* Since we ignore damage events while a window is frozen for certain effects
|
||||
* we may need to issue an update_area() covering the whole pixmap if we
|
||||
* don't know what real damage has happened. */
|
||||
int i, n_rects = cairo_region_num_rectangles (priv->pending_damage);
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
meta_surface_actor_process_damage (self, 0, 0,
|
||||
clutter_actor_get_width (CLUTTER_ACTOR (priv->texture)),
|
||||
clutter_actor_get_height (CLUTTER_ACTOR (priv->texture)));
|
||||
priv->needs_damage_all = FALSE;
|
||||
/* Since we ignore damage events while a window is frozen for certain effects
|
||||
* we need to apply the tracked damage now. */
|
||||
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
cairo_region_get_rectangle (priv->pending_damage, i, &rect);
|
||||
meta_surface_actor_process_damage (self, rect.x, rect.y,
|
||||
rect.width, rect.height);
|
||||
}
|
||||
g_clear_pointer (&priv->pending_damage, cairo_region_destroy);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -761,12 +761,18 @@ sync_client_window_mapped (MetaWindow *window)
|
||||
static void
|
||||
meta_window_update_desc (MetaWindow *window)
|
||||
{
|
||||
g_autofree gchar *title = NULL;
|
||||
|
||||
g_clear_pointer (&window->desc, g_free);
|
||||
|
||||
if (window->title)
|
||||
title = g_utf8_substring (window->title, 0,
|
||||
MIN (10, g_utf8_strlen (window->title, -1)));
|
||||
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||
{
|
||||
if (window->title)
|
||||
window->desc = g_strdup_printf ("0x%lx (%.10s)", window->xwindow, window->title);
|
||||
if (title)
|
||||
window->desc = g_strdup_printf ("0x%lx (%s)", window->xwindow, title);
|
||||
else
|
||||
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
|
||||
}
|
||||
@ -774,8 +780,8 @@ meta_window_update_desc (MetaWindow *window)
|
||||
{
|
||||
guint64 small_stamp = window->stamp - G_GUINT64_CONSTANT(0x100000000);
|
||||
|
||||
if (window->title)
|
||||
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT " (%.10s)", small_stamp, window->title);
|
||||
if (title)
|
||||
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT " (%s)", small_stamp, title);
|
||||
else
|
||||
window->desc = g_strdup_printf ("W%" G_GUINT64_FORMAT , small_stamp);
|
||||
}
|
||||
|
@ -400,6 +400,10 @@ wl_shell_surface_set_title (struct wl_client *client,
|
||||
surface_from_wl_shell_surface_resource (resource);
|
||||
|
||||
g_clear_pointer (&wl_shell_surface->title, g_free);
|
||||
|
||||
if (!g_utf8_validate (title, -1, NULL))
|
||||
title = "";
|
||||
|
||||
wl_shell_surface->title = g_strdup (title);
|
||||
|
||||
if (surface->window)
|
||||
@ -417,6 +421,10 @@ wl_shell_surface_set_class (struct wl_client *client,
|
||||
surface_from_wl_shell_surface_resource (resource);
|
||||
|
||||
g_clear_pointer (&wl_shell_surface->wm_class, g_free);
|
||||
|
||||
if (!g_utf8_validate (class_, -1, NULL))
|
||||
class_ = "";
|
||||
|
||||
wl_shell_surface->wm_class = g_strdup (class_);
|
||||
|
||||
if (surface->window)
|
||||
|
@ -35,6 +35,13 @@
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
#include "xdg-shell-unstable-v5-server-protocol.h"
|
||||
|
||||
/*
|
||||
* Define GNOME additional states to xdg-shell
|
||||
* The current reserved range for GNOME is 0x1000 - 0x1FFF
|
||||
*/
|
||||
|
||||
#define XDG_SURFACE_STATE_GNOME_TILED 0x1000
|
||||
|
||||
struct _MetaWaylandXdgSurface
|
||||
{
|
||||
MetaWaylandSurfaceRoleShellSurface parent;
|
||||
@ -136,6 +143,9 @@ xdg_surface_set_title (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_surface_resource (resource);
|
||||
|
||||
if (!g_utf8_validate (title, -1, NULL))
|
||||
title = "";
|
||||
|
||||
meta_window_set_title (surface->window, title);
|
||||
}
|
||||
|
||||
@ -146,6 +156,9 @@ xdg_surface_set_app_id (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_surface_resource (resource);
|
||||
|
||||
if (!g_utf8_validate (app_id, -1, NULL))
|
||||
app_id = "";
|
||||
|
||||
meta_window_set_wm_class (surface->window, app_id, app_id);
|
||||
}
|
||||
|
||||
@ -393,6 +406,13 @@ fill_states (struct wl_array *states, MetaWindow *window)
|
||||
s = wl_array_add (states, sizeof *s);
|
||||
*s = XDG_SURFACE_STATE_ACTIVATED;
|
||||
}
|
||||
/* GNOME extension to xdg-shell states */
|
||||
if (window->tile_mode == META_TILE_LEFT ||
|
||||
window->tile_mode == META_TILE_RIGHT)
|
||||
{
|
||||
s = wl_array_add (states, sizeof *s);
|
||||
*s = XDG_SURFACE_STATE_GNOME_TILED;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -27,6 +27,8 @@
|
||||
#include "meta-window-wayland.h"
|
||||
|
||||
#include <meta/errors.h>
|
||||
#include <errno.h>
|
||||
#include <string.h> /* for strerror () */
|
||||
#include "window-private.h"
|
||||
#include "boxes-private.h"
|
||||
#include "stack-tracker.h"
|
||||
@ -102,6 +104,24 @@ meta_window_wayland_kill (MetaWindow *window)
|
||||
{
|
||||
MetaWaylandSurface *surface = window->surface;
|
||||
struct wl_resource *resource = surface->resource;
|
||||
pid_t pid;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
|
||||
wl_client_get_credentials (wl_resource_get_client (resource), &pid, &uid, &gid);
|
||||
if (pid > 0)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Killing %s with kill()\n",
|
||||
window->desc);
|
||||
|
||||
if (kill (pid, 9) == 0)
|
||||
return;
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Failed to signal %s: %s\n",
|
||||
window->desc, strerror (errno));
|
||||
}
|
||||
|
||||
/* Send the client an unrecoverable error to kill the client. */
|
||||
wl_resource_post_error (resource,
|
||||
@ -283,6 +303,7 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
||||
|
||||
if (new_x != window->rect.x || new_y != window->rect.y)
|
||||
{
|
||||
*result |= META_MOVE_RESIZE_RESULT_MOVED;
|
||||
wl_window->has_pending_move = TRUE;
|
||||
wl_window->pending_move_x = new_x;
|
||||
wl_window->pending_move_y = new_y;
|
||||
|
@ -635,7 +635,10 @@ reload_wm_name (MetaWindow *window,
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
{
|
||||
set_window_title (window, value->v.str);
|
||||
g_autofree gchar *title = g_convert (value->v.str, -1,
|
||||
"UTF-8", "LATIN1",
|
||||
NULL, NULL, NULL);
|
||||
set_window_title (window, title);
|
||||
|
||||
meta_verbose ("Using WM_NAME for new title of %s: \"%s\"\n",
|
||||
window->desc, window->title);
|
||||
@ -969,9 +972,13 @@ reload_wm_class (MetaWindow *window,
|
||||
{
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
{
|
||||
meta_window_set_wm_class (window,
|
||||
value->v.class_hint.res_class,
|
||||
value->v.class_hint.res_name);
|
||||
g_autofree gchar *res_class = g_convert (value->v.class_hint.res_class, -1,
|
||||
"UTF-8", "LATIN1",
|
||||
NULL, NULL, NULL);
|
||||
g_autofree gchar *res_name = g_convert (value->v.class_hint.res_name, -1,
|
||||
"UTF-8", "LATIN1",
|
||||
NULL, NULL, NULL);
|
||||
meta_window_set_wm_class (window, res_class, res_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user