From 2a2697910ae2d979faad2b61b4334adb5ac28247 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 15 Jan 2019 10:29:55 -0500 Subject: [PATCH] backends/native: update cursor on resume As mentioned in a previous commit, the proprietary NVIDIA driver garbles memory on suspend. That behavior, means that the cursor gets corrupted on suspend. This commit forces the cursor to redraw itself when the logind session becomes active (on VT switch and resume). --- src/backends/native/meta-backend-native.c | 1 + src/core/screen-private.h | 2 -- src/meta/screen.h | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 0730a4acb..fd95dfc11 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -655,6 +655,7 @@ void meta_backend_native_resume (MetaBackendNative *native) if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES)) { clutter_clear_glyph_cache (); + meta_screen_update_cursor (display->screen); g_signal_emit_by_name (display, "gl-video-memory-purged"); } diff --git a/src/core/screen-private.h b/src/core/screen-private.h index ff796f01a..37f2a01a1 100644 --- a/src/core/screen-private.h +++ b/src/core/screen-private.h @@ -122,8 +122,6 @@ void meta_screen_foreach_window (MetaScreen *scree MetaScreenWindowFunc func, gpointer data); -void meta_screen_update_cursor (MetaScreen *screen); - void meta_screen_update_tile_preview (MetaScreen *screen, gboolean delay); void meta_screen_hide_tile_preview (MetaScreen *screen); diff --git a/src/meta/screen.h b/src/meta/screen.h index 13c92516e..36c397418 100644 --- a/src/meta/screen.h +++ b/src/meta/screen.h @@ -125,4 +125,7 @@ void meta_screen_override_workspace_layout (MetaScreen *screen, void meta_screen_set_cursor (MetaScreen *screen, MetaCursor cursor); +void meta_screen_update_cursor (MetaScreen *screen); + + #endif