pidgin/pidgin

da9efbd154f3
Parents 3f81150e326b
Children adbd0a452065
replace spaces with tabs for the new idle tracker for macos
--- a/pidgin/gtkidle.c Mon Oct 14 02:07:07 2019 -0500
+++ b/pidgin/gtkidle.c Mon Oct 14 02:10:36 2019 -0500
@@ -83,29 +83,29 @@
{
# ifdef HAVE_IOKIT
/* Query the IOKit API */
- double idleSeconds = -1;
- io_iterator_t iter = 0;
- if (IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceMatching("IOHIDSystem"), &iter) == KERN_SUCCESS) {
- io_registry_entry_t entry = IOIteratorNext(iter);
- if (entry) {
- CFMutableDictionaryRef dict = NULL;
- kern_return_t status;
- status = IORegistryEntryCreateCFProperties(entry, &dict, kCFAllocatorDefault, 0);
- if (status == KERN_SUCCESS) {
- CFNumberRef obj = CFDictionaryGetValue(dict, CFSTR("HIDIdleTime"));
- if (obj) {
- int64_t nanoseconds = 0;
- if (CFNumberGetValue(obj, kCFNumberSInt64Type, &nanoseconds)) {
- idleSeconds = (double) nanoseconds / NSEC_PER_SEC;
- }
- }
- CFRelease(dict);
- }
- IOObjectRelease(entry);
- }
- IOObjectRelease(iter);
- }
- return idleSeconds;
+ double idleSeconds = -1;
+ io_iterator_t iter = 0;
+ if (IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceMatching("IOHIDSystem"), &iter) == KERN_SUCCESS) {
+ io_registry_entry_t entry = IOIteratorNext(iter);
+ if (entry) {
+ CFMutableDictionaryRef dict = NULL;
+ kern_return_t status;
+ status = IORegistryEntryCreateCFProperties(entry, &dict, kCFAllocatorDefault, 0);
+ if (status == KERN_SUCCESS) {
+ CFNumberRef obj = CFDictionaryGetValue(dict, CFSTR("HIDIdleTime"));
+ if (obj) {
+ int64_t nanoseconds = 0;
+ if (CFNumberGetValue(obj, kCFNumberSInt64Type, &nanoseconds)) {
+ idleSeconds = (double) nanoseconds / NSEC_PER_SEC;
+ }
+ }
+ CFRelease(dict);
+ }
+ IOObjectRelease(entry);
+ }
+ IOObjectRelease(iter);
+ }
+ return idleSeconds;
# else
# ifdef _WIN32
/* Query Windows */