Assume the default printer name is set as below:
/etc/cups/printers.conf: PrinterA
~/.cups/lpoptions: PrinterB
When use the cupsGetDests to get the default printer name:
Ubuntu19.04 (CUPS2.2.10): The PrinterB's dest->is_default = 1
Ubuntu19.10 (CUPS2.2.12): The PrinterA's dest->is_default = 1
I tried to analyze the code, is the cups_enum_dests()'s logic changed?
(1) data.def_name stores the system default name ("PrinterA")
(2) Get the use default name from ~/.cups/lpoptions ("PrinterB")
(3) According the data.def_name ("PrinterA") to set the dest->is_default = 1
getDefaultPrinter.txt