From efde781747f2900098e405e1532d23e117cdd55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 18 Mar 2021 12:04:18 +0100 Subject: [PATCH] input-settings: Make set_matrix() vfunc take const float array pointer It shouldn't alter it, or take ownership, so clarify that by making it constant. Part-of: --- src/backends/meta-input-settings-dummy.c | 2 +- src/backends/meta-input-settings-private.h | 2 +- src/backends/native/meta-input-settings-native.c | 2 +- src/backends/x11/meta-input-settings-x11.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backends/meta-input-settings-dummy.c b/src/backends/meta-input-settings-dummy.c index ff980423c..74e6f429c 100644 --- a/src/backends/meta-input-settings-dummy.c +++ b/src/backends/meta-input-settings-dummy.c @@ -35,7 +35,7 @@ meta_input_settings_dummy_set_send_events (MetaInputSettings *settings, static void meta_input_settings_dummy_set_matrix (MetaInputSettings *settings, ClutterInputDevice *device, - gfloat matrix[6]) + const float matrix[6]) { } diff --git a/src/backends/meta-input-settings-private.h b/src/backends/meta-input-settings-private.h index 10de61d78..42ee0e0e6 100644 --- a/src/backends/meta-input-settings-private.h +++ b/src/backends/meta-input-settings-private.h @@ -81,7 +81,7 @@ struct _MetaInputSettingsClass GDesktopDeviceSendEvents mode); void (* set_matrix) (MetaInputSettings *settings, ClutterInputDevice *device, - gfloat matrix[6]); + const float matrix[6]); void (* set_speed) (MetaInputSettings *settings, ClutterInputDevice *device, gdouble speed); diff --git a/src/backends/native/meta-input-settings-native.c b/src/backends/native/meta-input-settings-native.c index 552fa84a4..18aafcc78 100644 --- a/src/backends/native/meta-input-settings-native.c +++ b/src/backends/native/meta-input-settings-native.c @@ -147,7 +147,7 @@ set_matrix (GTask *task) static void meta_input_settings_native_set_matrix (MetaInputSettings *settings, ClutterInputDevice *device, - gfloat matrix[6]) + const float matrix[6]) { MetaInputSettingsNative *input_settings_native; cairo_matrix_t *dev_matrix; diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c index a8b366315..96390285a 100644 --- a/src/backends/x11/meta-input-settings-x11.c +++ b/src/backends/x11/meta-input-settings-x11.c @@ -203,7 +203,7 @@ meta_input_settings_x11_set_send_events (MetaInputSettings *settings, static void meta_input_settings_x11_set_matrix (MetaInputSettings *settings, ClutterInputDevice *device, - gfloat matrix[6]) + const float matrix[6]) { MetaBackend *backend = meta_get_backend (); Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));