mirror of https://github.com/GNOME/gimp.git
app: sort present devices to the beginning of the device list
and make sure the core pointer is always first in the list.
This commit is contained in:
parent
6e2d56a9b8
commit
9c98b0b804
|
@ -836,14 +836,24 @@ gint
|
|||
gimp_device_info_compare (GimpDeviceInfo *a,
|
||||
GimpDeviceInfo *b)
|
||||
{
|
||||
if (a->device && ! b->device)
|
||||
if (a->device && a->display &&
|
||||
a->device == gdk_display_get_core_pointer (a->display))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (b->device && b->display &&
|
||||
b->device == gdk_display_get_core_pointer (b->display))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (! a->device && b->device)
|
||||
else if (a->device && ! b->device)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (! a->device && b->device)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return gimp_object_name_collate ((GimpObject *) a,
|
||||
|
|
Loading…
Reference in New Issue