From 0871f341ac38fea4f43441b592a1163ee344166c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 7 May 2025 11:52:05 -0400 Subject: [PATCH] Use printer-modified event when changing the default printer (Issue #1246) --- CHANGES.md | 2 ++ scheduler/ipp.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a1e82cdd68..ef8457ef02 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ CHANGES - OpenPrinting CUPS Changes in CUPS v2.4.13 (YYYY-MM-DD) ------------------------------------ +- Updated the scheduler to send the "printer-modified" event whenever the system + default printer is changed (Issue #1246) - Fixed a memory leak in `httpClose` (Issue #1223) - Fixed missing commas in `ippCreateRequestedArray` (Issue #1234) - Fixed subscription issues in the scheduler and D-Bus notifier (Issue #1235) diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 1b3769ce09..68b8be99cb 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -10503,10 +10503,10 @@ set_default(cupsd_client_t *con, /* I - Client connection */ DefaultPrinter = printer; if (oldprinter) - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, oldprinter, NULL, + cupsdAddEvent(CUPSD_EVENT_PRINTER_MODIFIED, oldprinter, NULL, "%s is no longer the default printer.", oldprinter->name); - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, printer, NULL, + cupsdAddEvent(CUPSD_EVENT_PRINTER_MODIFIED, printer, NULL, "%s is now the default printer.", printer->name); cupsdMarkDirty(CUPSD_DIRTY_PRINTERS | CUPSD_DIRTY_CLASSES | -- 2.47.3