Skip to content

Commit 0871f34

Browse files
committed
Use printer-modified event when changing the default printer (Issue #1246)
1 parent d707cbc commit 0871f34

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ CHANGES - OpenPrinting CUPS
55
Changes in CUPS v2.4.13 (YYYY-MM-DD)
66
------------------------------------
77

8+
- Updated the scheduler to send the "printer-modified" event whenever the system
9+
default printer is changed (Issue #1246)
810
- Fixed a memory leak in `httpClose` (Issue #1223)
911
- Fixed missing commas in `ippCreateRequestedArray` (Issue #1234)
1012
- Fixed subscription issues in the scheduler and D-Bus notifier (Issue #1235)

scheduler/ipp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10503,10 +10503,10 @@ set_default(cupsd_client_t *con, /* I - Client connection */
1050310503
DefaultPrinter = printer;
1050410504

1050510505
if (oldprinter)
10506-
cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, oldprinter, NULL,
10506+
cupsdAddEvent(CUPSD_EVENT_PRINTER_MODIFIED, oldprinter, NULL,
1050710507
"%s is no longer the default printer.", oldprinter->name);
1050810508

10509-
cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, printer, NULL,
10509+
cupsdAddEvent(CUPSD_EVENT_PRINTER_MODIFIED, printer, NULL,
1051010510
"%s is now the default printer.", printer->name);
1051110511

1051210512
cupsdMarkDirty(CUPSD_DIRTY_PRINTERS | CUPSD_DIRTY_CLASSES |

0 commit comments

Comments
 (0)