[mutter] backends: Protect from reentrancy in meta_cursor_sprite_load_from_theme
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends: Protect from reentrancy in meta_cursor_sprite_load_from_theme
- Date: Fri, 17 Nov 2017 16:26:58 +0000 (UTC)
commit 1790320ba3063ed1661cd7ca1e8590ac4ab901a6
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 17 14:07:20 2017 +0100
backends: Protect from reentrancy in meta_cursor_sprite_load_from_theme
This function is supposedly not failable, so just move the theme_dirty
flag clearing to the beginning of the function. Protects against cases
where requesting a cursor image may result in it being loaded and set
as a texture, which emits ::texture-changed, which may end up requesting
the cursor image again.
https://bugzilla.gnome.org/show_bug.cgi?id=754806
src/backends/meta-cursor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-cursor.c b/src/backends/meta-cursor.c
index ccd0ab0..beeee76 100644
--- a/src/backends/meta-cursor.c
+++ b/src/backends/meta-cursor.c
@@ -229,6 +229,8 @@ meta_cursor_sprite_load_from_theme (MetaCursorSprite *self)
g_assert (self->cursor != META_CURSOR_NONE);
+ self->theme_dirty = FALSE;
+
/* We might be reloading with a different scale. If so clear the old data. */
if (self->xcursor_images)
{
@@ -244,8 +246,6 @@ meta_cursor_sprite_load_from_theme (MetaCursorSprite *self)
image = meta_cursor_sprite_get_current_frame_image (self);
meta_cursor_sprite_load_from_xcursor_image (self, image);
-
- self->theme_dirty = FALSE;
}
MetaCursorSprite *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]