Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Commit

Permalink
Fixed Issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Eun committed Sep 11, 2014
1 parent 8819533 commit d05b679
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions DisableMonitorAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,7 @@ -(void)ToggleMonitor:(DisplayData*) displayData enabled:(Boolean) enabled
return;
}

//CGConfigureDisplayFadeEffect (config, 0, 0, 0, 0, 0);

err = CGCompleteDisplayConfiguration(config, kCGConfigurePermanently);
if (err != 0)
{
ShowError(@"Error in CGCompleteDisplayConfiguration: %d", err);
}

CGConfigureDisplayFadeEffect (config, 0, 0, 0, 0, 0);

io_registry_entry_t entry = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/IOResources/IODisplayWrangler");
if (entry)
Expand All @@ -351,10 +344,12 @@ -(void)ToggleMonitor:(DisplayData*) displayData enabled:(Boolean) enabled
IORegistryEntrySetCFProperty(entry, CFSTR("IORequestIdle"), kCFBooleanFalse);
IOObjectRelease(entry);
}




err = CGCompleteDisplayConfiguration(config, kCGConfigurePermanently);
if (err != 0)
{
ShowError(@"Error in CGCompleteDisplayConfiguration: %d", err);
}
}
@catch (NSException *exception) {

Expand Down

0 comments on commit d05b679

Please sign in to comment.