]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/sysman.c
The scheduler was being backgrounded on macOS, causing applications to spin
[thirdparty/cups.git] / scheduler / sysman.c
index 8c8cf1cdebc7d32e849875da53c2cbfa60170cbd..e7f79e3dec74fac41a2df553f0c676470e10b869 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * System management functions for the CUPS scheduler.
  *
- * Copyright 2007-2017 by Apple Inc.
+ * Copyright 2007-2018 by Apple Inc.
  * Copyright 2006 by Easy Software Products.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
@@ -14,7 +14,6 @@
 
 #include "cupsd.h"
 #ifdef __APPLE__
-#  include <xpc/xpc.h>
 #  include <IOKit/pwr_mgt/IOPMLib.h>
 #endif /* __APPLE__ */
 
@@ -125,7 +124,6 @@ cupsdSetBusyState(int working)          /* I - Doing significant work? */
     "Active clients, printing jobs, and dirty files"
   };
 #ifdef __APPLE__
-  static int tran = 0; /* Current busy transaction */
   static IOPMAssertionID keep_awake = 0;/* Keep the system awake while printing */
 #endif /* __APPLE__ */
 
@@ -164,23 +162,8 @@ cupsdSetBusyState(int working)          /* I - Doing significant work? */
   */
 
   if (newbusy != busy)
-  {
     busy = newbusy;
 
-#ifdef __APPLE__
-    if (busy && !tran)
-    {
-      xpc_transaction_begin();
-      tran = 1;
-    }
-    else if (!busy && tran)
-    {
-      xpc_transaction_end();
-      tran = 0;
-    }
-#endif /* __APPLE__ */
-  }
-
 #ifdef __APPLE__
   if (cupsArrayCount(PrintingJobs) > 0 && !keep_awake)
   {