display: avoid critical on master devices
When the device is of type GDK_DEVICE_TYPE_MASTER, calling gdk_device_get_vendor_id() and gdk_device_get_product_id() fails and triggers a CRITICAL warning. This commit avoids invoking these functions on master devices, where failure is guaranteed. See #14219
This commit is contained in:
parent
92150e07ba
commit
6574f6ff30
1 changed files with 8 additions and 4 deletions
|
|
@ -513,13 +513,17 @@ gimp_modifiers_manager_get_keys (GdkDevice *device,
|
|||
gchar **actions_key,
|
||||
gchar **buttons_key)
|
||||
{
|
||||
const gchar *vendor_id;
|
||||
const gchar *product_id;
|
||||
const gchar *vendor_id = NULL;
|
||||
const gchar *product_id = NULL;
|
||||
|
||||
g_return_if_fail (GDK_IS_DEVICE (device) || device == NULL);
|
||||
|
||||
vendor_id = device ? gdk_device_get_vendor_id (device) : NULL;
|
||||
product_id = device ? gdk_device_get_product_id (device) : NULL;
|
||||
if (device && gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER)
|
||||
{
|
||||
vendor_id = gdk_device_get_vendor_id (device);
|
||||
product_id = gdk_device_get_product_id (device);
|
||||
}
|
||||
|
||||
modifiers = modifiers & gimp_get_all_modifiers_mask ();
|
||||
|
||||
if (actions_key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue