84 lines
2.0 KiB
Diff
84 lines
2.0 KiB
Diff
|
From 2d63749878c1afa7d83a44c4d5e6c1aec3414b71 Mon Sep 17 00:00:00 2001
|
||
|
From: Ray Strode <rstrode@redhat.com>
|
||
|
Date: Tue, 15 Jan 2019 12:51:16 -0500
|
||
|
Subject: [PATCH 1/4] background: refresh after suspend on wayland
|
||
|
|
||
|
At the moment we only refresh after suspend on Xorg.
|
||
|
|
||
|
We need to do it on wayland, too.
|
||
|
---
|
||
|
src/shell-util.c | 3 ---
|
||
|
1 file changed, 3 deletions(-)
|
||
|
|
||
|
diff --git a/src/shell-util.c b/src/shell-util.c
|
||
|
index 70b8c0611..c43bf4cc5 100644
|
||
|
--- a/src/shell-util.c
|
||
|
+++ b/src/shell-util.c
|
||
|
@@ -372,63 +372,60 @@ shell_util_cursor_tracker_to_clutter (MetaCursorTracker *tracker,
|
||
|
clutter_actor_show (CLUTTER_ACTOR (texture));
|
||
|
clutter_texture_set_cogl_texture (texture, sprite);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
clutter_actor_hide (CLUTTER_ACTOR (texture));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
typedef const gchar *(*ShellGLGetString) (GLenum);
|
||
|
|
||
|
static const gchar *
|
||
|
get_gl_vendor (void)
|
||
|
{
|
||
|
static const gchar *vendor = NULL;
|
||
|
|
||
|
if (!vendor)
|
||
|
{
|
||
|
ShellGLGetString gl_get_string;
|
||
|
gl_get_string = (ShellGLGetString) cogl_get_proc_address ("glGetString");
|
||
|
if (gl_get_string)
|
||
|
vendor = gl_get_string (GL_VENDOR);
|
||
|
}
|
||
|
|
||
|
return vendor;
|
||
|
}
|
||
|
|
||
|
gboolean
|
||
|
shell_util_need_background_refresh (void)
|
||
|
{
|
||
|
- if (!clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
|
||
|
- return FALSE;
|
||
|
-
|
||
|
if (g_strcmp0 (get_gl_vendor (), "NVIDIA Corporation") == 0)
|
||
|
return TRUE;
|
||
|
|
||
|
return FALSE;
|
||
|
}
|
||
|
|
||
|
static gboolean
|
||
|
canvas_draw_cb (ClutterContent *content,
|
||
|
cairo_t *cr,
|
||
|
gint width,
|
||
|
gint height,
|
||
|
gpointer user_data)
|
||
|
{
|
||
|
cairo_surface_t *surface = user_data;
|
||
|
|
||
|
cairo_set_source_surface (cr, surface, 0, 0);
|
||
|
cairo_paint (cr);
|
||
|
|
||
|
return FALSE;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* shell_util_get_content_for_window_actor:
|
||
|
* @window_actor: a #MetaWindowActor
|
||
|
* @window_rect: a #MetaRectangle
|
||
|
*
|
||
|
* Returns: (transfer full): a new #ClutterContent
|
||
|
*/
|
||
|
ClutterContent *
|
||
|
shell_util_get_content_for_window_actor (MetaWindowActor *window_actor,
|
||
|
--
|
||
|
2.18.1
|
||
|
|