[mutter/wip/carlosg/unthrottled-wayland: 5/5] ci: Force a valid xcursor path




commit a24dbb00e507ead16bcd78d5e64674c9b063454a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jul 17 18:15:39 2021 +0200

    ci: Force a valid xcursor path
    
    The aarch64 tests somehow don't seem to find xcursor icons, make
    all tests look at the default location.

 .gitlab-ci.yml                            | 2 ++
 src/backends/meta-cursor-renderer.c       | 1 +
 src/backends/meta-cursor-sprite-xcursor.c | 5 ++++-
 src/backends/meta-logical-monitor.c       | 2 ++
 src/core/display.c                        | 2 ++
 5 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 771a8f010b..f13ed80bae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -197,7 +197,9 @@ build-without-native-backend-and-wayland@x86_64:
     G_SLICE: "always-malloc"
     MALLOC_CHECK_: "3"
     NO_AT_BRIDGE: "1"
+    XCURSOR_PATH: "/usr/share/icons/"
   script:
+    - ls -l /usr/share/icons/
     - mkdir -m 700 $XDG_RUNTIME_DIR
     - dbus-run-session -- bash -x ./.gitlab-ci/run-tests.sh
   artifacts:
diff --git a/src/backends/meta-cursor-renderer.c b/src/backends/meta-cursor-renderer.c
index aa2f7f0031..37345bb529 100644
--- a/src/backends/meta-cursor-renderer.c
+++ b/src/backends/meta-cursor-renderer.c
@@ -400,6 +400,7 @@ meta_cursor_renderer_update_cursor (MetaCursorRenderer *renderer,
     {
       float scale = find_highest_logical_monitor_scale (priv->backend,
                                                         cursor_sprite);
+      g_debug ("cursor renderer update cursor, %f\n", scale);
       meta_cursor_sprite_prepare_at (cursor_sprite,
                                      MAX (1, scale),
                                      (int) priv->current_x,
diff --git a/src/backends/meta-cursor-sprite-xcursor.c b/src/backends/meta-cursor-sprite-xcursor.c
index 96942e3fe1..8c807deb80 100644
--- a/src/backends/meta-cursor-sprite-xcursor.c
+++ b/src/backends/meta-cursor-sprite-xcursor.c
@@ -168,7 +168,10 @@ load_cursor_on_client (MetaCursor cursor, int scale)
   if (xcursor_images)
     return xcursor_images;
 
-  g_warning_once ("No cursor theme available, please install a cursor theme");
+  g_warning_once ("No '%s' cursor theme available for size %d (scale %d),"
+                  " please install a cursor theme",
+                  meta_prefs_get_cursor_theme (),
+                  meta_prefs_get_cursor_size (), scale);
 
   fallback_size = 24 * scale;
   xcursor_images = XcursorImagesCreate (1);
diff --git a/src/backends/meta-logical-monitor.c b/src/backends/meta-logical-monitor.c
index b562e5acb3..e6b00fd0f5 100644
--- a/src/backends/meta-logical-monitor.c
+++ b/src/backends/meta-logical-monitor.c
@@ -100,6 +100,7 @@ meta_logical_monitor_new (MetaMonitorManager       *monitor_manager,
 
   logical_monitor->number = monitor_number;
   logical_monitor->winsys_id = meta_output_get_id (main_output);
+  g_debug ("New logical monitor, scale %f", logical_monitor_config->scale);
   logical_monitor->scale = logical_monitor_config->scale;
   logical_monitor->transform = logical_monitor_config->transform;
   logical_monitor->in_fullscreen = -1;
@@ -149,6 +150,7 @@ meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
   main_output = meta_monitor_get_main_output (monitor);
   logical_monitor->number = monitor_number;
   logical_monitor->winsys_id = meta_output_get_id (main_output);
+  g_debug ("New derived logical monitor, scale %f", scale);
   logical_monitor->scale = scale;
   logical_monitor->transform = transform;
   logical_monitor->in_fullscreen = -1;
diff --git a/src/core/display.c b/src/core/display.c
index 969988af4d..5cfdb965c0 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1663,6 +1663,7 @@ root_cursor_prepare_at (MetaCursorSpriteXcursor *sprite_xcursor,
           float ceiled_scale;
 
           ceiled_scale = ceilf (best_scale);
+          g_debug ("prepare at, views scaled: %f\n", best_scale);
           meta_cursor_sprite_xcursor_set_theme_scale (sprite_xcursor,
                                                       (int) ceiled_scale);
           meta_cursor_sprite_set_texture_scale (cursor_sprite,
@@ -1681,6 +1682,7 @@ root_cursor_prepare_at (MetaCursorSpriteXcursor *sprite_xcursor,
       /* Reload the cursor texture if the scale has changed. */
       if (logical_monitor)
         {
+          g_debug ("prepare at, logical monitor: %f\n", logical_monitor->scale);
           meta_cursor_sprite_xcursor_set_theme_scale (sprite_xcursor,
                                                       logical_monitor->scale);
           meta_cursor_sprite_set_texture_scale (cursor_sprite, 1.0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]