Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3082504d1b | ||
![]() |
8a529123be | ||
![]() |
54a680266c | ||
![]() |
e6d414edfc | ||
![]() |
70f20c90bd | ||
![]() |
b5f7005b88 |
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
|||||||
|
3.18.4
|
||||||
|
======
|
||||||
|
* Fix mouse cursor disappearing in some multi-monitor setups [Rui; #763159]
|
||||||
|
* Do not assert on non-fatal runtime errors [Florian; #765058]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Rui Matos, Florian Müllner
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Cédric Valmary [oc]
|
||||||
|
|
||||||
3.18.3
|
3.18.3
|
||||||
======
|
======
|
||||||
* Fix initialization of bypass compositor hint [Rui; #758544]
|
* Fix initialization of bypass compositor hint [Rui; #758544]
|
||||||
|
@@ -2,7 +2,7 @@ AC_PREREQ(2.62)
|
|||||||
|
|
||||||
m4_define([mutter_major_version], [3])
|
m4_define([mutter_major_version], [3])
|
||||||
m4_define([mutter_minor_version], [18])
|
m4_define([mutter_minor_version], [18])
|
||||||
m4_define([mutter_micro_version], [3])
|
m4_define([mutter_micro_version], [4])
|
||||||
|
|
||||||
m4_define([mutter_version],
|
m4_define([mutter_version],
|
||||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||||
|
@@ -27,8 +27,6 @@
|
|||||||
#include "meta-cursor-renderer.h"
|
#include "meta-cursor-renderer.h"
|
||||||
|
|
||||||
#include <meta/meta-backend.h>
|
#include <meta/meta-backend.h>
|
||||||
#include <backends/meta-backend-private.h>
|
|
||||||
#include <backends/meta-monitor-manager-private.h>
|
|
||||||
#include <meta/util.h>
|
#include <meta/util.h>
|
||||||
|
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
@@ -118,14 +116,6 @@ meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_cursor_in_monitors_area (int x, int y)
|
|
||||||
{
|
|
||||||
MetaMonitorManager *monitor_manager = meta_backend_get_monitor_manager (meta_get_backend ());
|
|
||||||
return meta_monitor_manager_get_monitor_at_point (monitor_manager,
|
|
||||||
(gfloat) x, (gfloat) y) >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_cursor (MetaCursorRenderer *renderer,
|
update_cursor (MetaCursorRenderer *renderer,
|
||||||
MetaCursorSprite *cursor_sprite)
|
MetaCursorSprite *cursor_sprite)
|
||||||
@@ -134,11 +124,6 @@ update_cursor (MetaCursorRenderer *renderer,
|
|||||||
gboolean handled_by_backend;
|
gboolean handled_by_backend;
|
||||||
gboolean should_redraw = FALSE;
|
gboolean should_redraw = FALSE;
|
||||||
|
|
||||||
/* do not render cursor if it is not on any monitor. Such situation
|
|
||||||
* can occur e. g. after monitor hot-plug */
|
|
||||||
if (!is_cursor_in_monitors_area (priv->current_x, priv->current_y))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (cursor_sprite)
|
if (cursor_sprite)
|
||||||
meta_cursor_sprite_prepare_at (cursor_sprite,
|
meta_cursor_sprite_prepare_at (cursor_sprite,
|
||||||
priv->current_x,
|
priv->current_x,
|
||||||
|
@@ -198,6 +198,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
|||||||
guint8 *cursor_data;
|
guint8 *cursor_data;
|
||||||
gboolean free_cursor_data;
|
gboolean free_cursor_data;
|
||||||
CoglContext *ctx;
|
CoglContext *ctx;
|
||||||
|
CoglError *error = NULL;
|
||||||
|
|
||||||
if (tracker->xfixes_cursor)
|
if (tracker->xfixes_cursor)
|
||||||
return;
|
return;
|
||||||
@@ -239,11 +240,17 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
|
|||||||
CLUTTER_CAIRO_FORMAT_ARGB32,
|
CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||||
cursor_image->width * 4, /* stride */
|
cursor_image->width * 4, /* stride */
|
||||||
cursor_data,
|
cursor_data,
|
||||||
NULL);
|
&error);
|
||||||
|
|
||||||
if (free_cursor_data)
|
if (free_cursor_data)
|
||||||
g_free (cursor_data);
|
g_free (cursor_data);
|
||||||
|
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate cursor sprite texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
if (sprite != NULL)
|
if (sprite != NULL)
|
||||||
{
|
{
|
||||||
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();
|
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();
|
||||||
|
@@ -136,6 +136,7 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
|||||||
ClutterBackend *clutter_backend;
|
ClutterBackend *clutter_backend;
|
||||||
CoglContext *cogl_context;
|
CoglContext *cogl_context;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
CoglError *error = NULL;
|
||||||
|
|
||||||
g_assert (self->texture == NULL);
|
g_assert (self->texture == NULL);
|
||||||
|
|
||||||
@@ -156,10 +157,19 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
|
|||||||
cogl_format,
|
cogl_format,
|
||||||
rowstride,
|
rowstride,
|
||||||
(uint8_t *) xc_image->pixels,
|
(uint8_t *) xc_image->pixels,
|
||||||
NULL);
|
&error);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate cursor texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
meta_cursor_sprite_set_texture (self, texture,
|
meta_cursor_sprite_set_texture (self, texture,
|
||||||
xc_image->xhot, xc_image->yhot);
|
xc_image->xhot, xc_image->yhot);
|
||||||
cogl_object_unref (texture);
|
|
||||||
|
if (texture)
|
||||||
|
cogl_object_unref (texture);
|
||||||
|
|
||||||
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
|
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
|
||||||
}
|
}
|
||||||
|
@@ -152,6 +152,7 @@ file_loaded (GObject *source_object,
|
|||||||
{
|
{
|
||||||
MetaBackgroundImage *image = META_BACKGROUND_IMAGE (source_object);
|
MetaBackgroundImage *image = META_BACKGROUND_IMAGE (source_object);
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
CoglError *catch_error = NULL;
|
||||||
GTask *task;
|
GTask *task;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
@@ -186,9 +187,10 @@ file_loaded (GObject *source_object,
|
|||||||
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
|
||||||
row_stride,
|
row_stride,
|
||||||
pixels, 0,
|
pixels, 0,
|
||||||
NULL))
|
&catch_error))
|
||||||
{
|
{
|
||||||
g_warning ("Failed to create texture for background");
|
g_warning ("Failed to create texture for background");
|
||||||
|
cogl_error_free (catch_error);
|
||||||
cogl_object_unref (texture);
|
cogl_object_unref (texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <meta/util.h>
|
||||||
#include <meta/meta-background.h>
|
#include <meta/meta-background.h>
|
||||||
#include <meta/meta-background-image.h>
|
#include <meta/meta-background-image.h>
|
||||||
#include "meta-background-private.h"
|
#include "meta-background-private.h"
|
||||||
@@ -542,6 +543,7 @@ ensure_color_texture (MetaBackground *self)
|
|||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
||||||
|
CoglError *error = NULL;
|
||||||
uint8_t pixels[6];
|
uint8_t pixels[6];
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
@@ -582,7 +584,13 @@ ensure_color_texture (MetaBackground *self)
|
|||||||
COGL_PIXEL_FORMAT_RGB_888,
|
COGL_PIXEL_FORMAT_RGB_888,
|
||||||
width * 3,
|
width * 3,
|
||||||
pixels,
|
pixels,
|
||||||
NULL));
|
&error));
|
||||||
|
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate color texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <meta/meta-shadow-factory.h>
|
#include <meta/meta-shadow-factory.h>
|
||||||
|
#include <meta/util.h>
|
||||||
|
|
||||||
#include "cogl-utils.h"
|
#include "cogl-utils.h"
|
||||||
#include "region-utils.h"
|
#include "region-utils.h"
|
||||||
@@ -707,6 +708,7 @@ make_shadow (MetaShadow *shadow,
|
|||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
|
||||||
|
CoglError *error = NULL;
|
||||||
int d = get_box_filter_size (shadow->key.radius);
|
int d = get_box_filter_size (shadow->key.radius);
|
||||||
int spread = get_shadow_spread (shadow->key.radius);
|
int spread = get_shadow_spread (shadow->key.radius);
|
||||||
cairo_rectangle_int_t extents;
|
cairo_rectangle_int_t extents;
|
||||||
@@ -804,7 +806,13 @@ make_shadow (MetaShadow *shadow,
|
|||||||
(buffer +
|
(buffer +
|
||||||
(y_offset - shadow->outer_border_top) * buffer_width +
|
(y_offset - shadow->outer_border_top) * buffer_width +
|
||||||
(x_offset - shadow->outer_border_left)),
|
(x_offset - shadow->outer_border_left)),
|
||||||
NULL));
|
&error));
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to allocate shadow texture: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
cairo_region_destroy (row_convolve_region);
|
cairo_region_destroy (row_convolve_region);
|
||||||
cairo_region_destroy (column_convolve_region);
|
cairo_region_destroy (column_convolve_region);
|
||||||
|
@@ -102,8 +102,7 @@ detach_pixmap (MetaSurfaceActorX11 *self)
|
|||||||
priv->pixmap = None;
|
priv->pixmap = None;
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
cogl_object_unref (priv->texture);
|
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||||
priv->texture = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -114,14 +113,20 @@ set_pixmap (MetaSurfaceActorX11 *self,
|
|||||||
|
|
||||||
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
|
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
|
||||||
|
CoglError *error = NULL;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
|
||||||
g_assert (priv->pixmap == None);
|
g_assert (priv->pixmap == None);
|
||||||
priv->pixmap = pixmap;
|
priv->pixmap = pixmap;
|
||||||
|
|
||||||
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, NULL));
|
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, &error));
|
||||||
|
|
||||||
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Failed to allocate stex texture: %s", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
|
else if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
|
||||||
g_warning ("NOTE: Not using GLX TFP!\n");
|
g_warning ("NOTE: Not using GLX TFP!\n");
|
||||||
|
|
||||||
priv->texture = texture;
|
priv->texture = texture;
|
||||||
|
@@ -1752,9 +1752,17 @@ build_and_scan_frame_mask (MetaWindowActor *self,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CoglError *error = NULL;
|
||||||
|
|
||||||
mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, tex_width, tex_height,
|
mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, tex_width, tex_height,
|
||||||
COGL_PIXEL_FORMAT_A_8,
|
COGL_PIXEL_FORMAT_A_8,
|
||||||
stride, mask_data, NULL));
|
stride, mask_data, &error));
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
g_warning ("Failed to allocate mask texture: %s", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_shaped_texture_set_mask_texture (stex, mask_texture);
|
meta_shaped_texture_set_mask_texture (stex, mask_texture);
|
||||||
|
@@ -1267,7 +1267,8 @@ root_cursor_prepare_at (MetaCursorSprite *cursor_sprite,
|
|||||||
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
||||||
|
|
||||||
/* Reload the cursor texture if the scale has changed. */
|
/* Reload the cursor texture if the scale has changed. */
|
||||||
meta_cursor_sprite_set_theme_scale (cursor_sprite, monitor->scale);
|
if (monitor)
|
||||||
|
meta_cursor_sprite_set_theme_scale (cursor_sprite, monitor->scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -138,12 +138,19 @@ meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer,
|
|||||||
|
|
||||||
for (i = 0; i < n_rectangles; i++)
|
for (i = 0; i < n_rectangles; i++)
|
||||||
{
|
{
|
||||||
|
CoglError *error = NULL;
|
||||||
cairo_rectangle_int_t rect;
|
cairo_rectangle_int_t rect;
|
||||||
cairo_region_get_rectangle (region, i, &rect);
|
cairo_region_get_rectangle (region, i, &rect);
|
||||||
cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture,
|
cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture,
|
||||||
rect.x, rect.y, rect.width, rect.height,
|
rect.x, rect.y, rect.width, rect.height,
|
||||||
shm_buffer,
|
shm_buffer,
|
||||||
rect.x, rect.y, 0, NULL);
|
rect.x, rect.y, 0, &error);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("Failed to set texture region: %s\n", error->message);
|
||||||
|
cogl_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_shm_buffer_end_access (shm_buffer);
|
wl_shm_buffer_end_access (shm_buffer);
|
||||||
|
@@ -112,7 +112,7 @@ struct wl_array *
|
|||||||
meta_wayland_data_source_get_mime_types (const MetaWaylandDataSource *source)
|
meta_wayland_data_source_get_mime_types (const MetaWaylandDataSource *source)
|
||||||
{
|
{
|
||||||
MetaWaylandDataSourcePrivate *priv =
|
MetaWaylandDataSourcePrivate *priv =
|
||||||
meta_wayland_data_source_get_instance_private (source);
|
meta_wayland_data_source_get_instance_private ((MetaWaylandDataSource *)source);
|
||||||
|
|
||||||
return &priv->mime_types;
|
return &priv->mime_types;
|
||||||
}
|
}
|
||||||
@@ -966,7 +966,7 @@ meta_wayland_data_source_has_mime_type (const MetaWaylandDataSource *source,
|
|||||||
const gchar *mime_type)
|
const gchar *mime_type)
|
||||||
{
|
{
|
||||||
MetaWaylandDataSourcePrivate *priv =
|
MetaWaylandDataSourcePrivate *priv =
|
||||||
meta_wayland_data_source_get_instance_private (source);
|
meta_wayland_data_source_get_instance_private ((MetaWaylandDataSource *)source);
|
||||||
gchar **p;
|
gchar **p;
|
||||||
|
|
||||||
wl_array_for_each (p, &priv->mime_types)
|
wl_array_for_each (p, &priv->mime_types)
|
||||||
|
@@ -823,8 +823,9 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
|
|||||||
if (!meta_xwayland_is_xwayland_surface (surface))
|
if (!meta_xwayland_is_xwayland_surface (surface))
|
||||||
{
|
{
|
||||||
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
monitor = meta_screen_get_monitor_for_point (screen, x, y);
|
||||||
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
if (monitor)
|
||||||
(float)monitor->scale / surface->scale);
|
meta_cursor_sprite_set_texture_scale (cursor_sprite,
|
||||||
|
(float)monitor->scale / surface->scale);
|
||||||
}
|
}
|
||||||
meta_wayland_surface_update_outputs (surface);
|
meta_wayland_surface_update_outputs (surface);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user