common: Update from gnome-settings-daemon
This commit is contained in:
parent
3b72790b72
commit
a23aa64ec7
3 changed files with 13 additions and 4 deletions
|
@ -92,8 +92,14 @@ create_device (GUdevDevice *udev_device)
|
|||
name = g_udev_device_get_sysfs_attr (parent, "name");
|
||||
vendor = g_udev_device_get_property (udev_device, "ID_VENDOR_ID");
|
||||
product = g_udev_device_get_property (udev_device, "ID_MODEL_ID");
|
||||
|
||||
if (!vendor || !product) {
|
||||
vendor = g_udev_device_get_sysfs_attr (udev_device, "device/id/vendor");
|
||||
product = g_udev_device_get_sysfs_attr (udev_device, "device/id/product");
|
||||
}
|
||||
|
||||
width = g_udev_device_get_property_as_int (udev_device, "ID_INPUT_WIDTH_MM");
|
||||
height = g_udev_device_get_property_as_int (udev_device, "ID_INPUT_WIDTH_MM");
|
||||
height = g_udev_device_get_property_as_int (udev_device, "ID_INPUT_HEIGHT_MM");
|
||||
|
||||
device = g_object_new (GSD_TYPE_DEVICE,
|
||||
"name", name,
|
||||
|
|
|
@ -145,10 +145,8 @@ remove_device (GsdX11DeviceManager *manager,
|
|||
|
||||
device = g_hash_table_lookup (manager->devices, device_file);
|
||||
|
||||
if (device)
|
||||
g_object_ref (device);
|
||||
|
||||
if (device) {
|
||||
g_object_ref (device);
|
||||
g_signal_emit_by_name (manager, "device-removed", device);
|
||||
g_object_unref (device);
|
||||
}
|
||||
|
|
|
@ -392,9 +392,14 @@ xdevice_get_dimensions (int deviceid,
|
|||
guint *value, w, h;
|
||||
int i, n_info;
|
||||
|
||||
gdk_error_trap_push ();
|
||||
|
||||
info = XIQueryDevice (GDK_DISPLAY_XDISPLAY (display), deviceid, &n_info);
|
||||
*width = *height = w = h = 0;
|
||||
|
||||
if (gdk_error_trap_pop ())
|
||||
return FALSE;
|
||||
|
||||
if (!info)
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue