mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
input-mapper: Fix (libwacom) tablet mapping to monitor
Remove early return when using libwacom, so guess_candidates returns monitor candidates for those devices, too. Additionally, changing the output of an input requires removing the input from its current output first. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1712 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1887>
This commit is contained in:
parent
8da65d7dcd
commit
4b0fd9ab76
@ -116,6 +116,9 @@ enum
|
|||||||
|
|
||||||
static guint signals[N_SIGNALS] = { 0, };
|
static guint signals[N_SIGNALS] = { 0, };
|
||||||
|
|
||||||
|
static void mapper_output_info_remove_input (MetaMapperOutputInfo *output,
|
||||||
|
MetaMapperInputInfo *input);
|
||||||
|
|
||||||
static void mapper_recalculate_input (MetaInputMapper *mapper,
|
static void mapper_recalculate_input (MetaInputMapper *mapper,
|
||||||
MetaMapperInputInfo *input);
|
MetaMapperInputInfo *input);
|
||||||
|
|
||||||
@ -166,6 +169,9 @@ settings_output_changed_cb (GSettings *settings,
|
|||||||
const char *key,
|
const char *key,
|
||||||
MetaMapperInputInfo *info)
|
MetaMapperInputInfo *info)
|
||||||
{
|
{
|
||||||
|
if (info->output != NULL)
|
||||||
|
mapper_output_info_remove_input (info->output, info);
|
||||||
|
|
||||||
mapper_recalculate_input (info->mapper, info);
|
mapper_recalculate_input (info->mapper, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,10 +498,6 @@ guess_candidates (MetaInputMapper *mapper,
|
|||||||
{
|
{
|
||||||
flags = libwacom_get_integration_flags (wacom_device);
|
flags = libwacom_get_integration_flags (wacom_device);
|
||||||
|
|
||||||
if ((flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
|
|
||||||
WACOM_DEVICE_INTEGRATED_DISPLAY)) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
integrated = (flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
|
integrated = (flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
|
||||||
WACOM_DEVICE_INTEGRATED_DISPLAY)) != 0;
|
WACOM_DEVICE_INTEGRATED_DISPLAY)) != 0;
|
||||||
builtin = (flags & WACOM_DEVICE_INTEGRATED_SYSTEM) != 0;
|
builtin = (flags & WACOM_DEVICE_INTEGRATED_SYSTEM) != 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user