backends: Add MetaInputSettings

This object internally keeps track of the relevant input configuration,
and goes through its vmethods in order to apply the configuration on the
backend-specific devices.

So far, only mouse/touchpad settings are actually attached to GSettings
changes. ::set_matrix(), meant for tablets/touchscreens, is not hooked
yet.

One caveat is that meta_input_settings_create() may return NULL if the
backend does not own the windowing system (wayland nested on X11 being
the one case), and thus device settings can't be changed freely.

https://bugzilla.gnome.org/show_bug.cgi?id=739397
This commit is contained in:
Carlos Garnacho
2014-10-29 15:30:52 +01:00
committed by Jasper St. Pierre
parent f083935c6e
commit 460e1fd7ca
4 changed files with 697 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include <meta/meta-backend.h>
#include "meta-backend-private.h"
#include "meta-input-settings-private.h"
#include "backends/x11/meta-backend-x11.h"
#include "meta-stage.h"
@ -55,6 +56,7 @@ struct _MetaBackendPrivate
{
MetaMonitorManager *monitor_manager;
MetaCursorRenderer *cursor_renderer;
MetaInputSettings *input_settings;
ClutterActor *stage;
};
@ -69,6 +71,7 @@ meta_backend_finalize (GObject *object)
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
g_clear_object (&priv->monitor_manager);
g_clear_object (&priv->input_settings);
g_hash_table_destroy (backend->device_monitors);
@ -185,6 +188,8 @@ meta_backend_real_post_init (MetaBackend *backend)
g_slist_free (devices);
}
priv->input_settings = meta_input_settings_create ();
}
static MetaCursorRenderer *