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

Commit

Permalink
Trying to reset the wallpapers
Browse files Browse the repository at this point in the history
  • Loading branch information
Eun committed Mar 2, 2015
1 parent 6053474 commit d0c288c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DisableMonitor-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.9</string>
<string>1.91</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.9</string>
<string>1.91</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>LSUIElement</key>
Expand Down
7 changes: 7 additions & 0 deletions DisableMonitorAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@ +(void)toggleMonitor:(CGDirectDisplayID)displayID enabled:(Boolean) enabled
ShowError(@"Error in CGCompleteDisplayConfiguration: %d", err);
}

// reset the wallpapers (Issue #10)
NSArray *screens = [NSScreen screens];
for (NSScreen *screen in screens) {
NSURL *url = [[NSWorkspace sharedWorkspace] desktopImageURLForScreen:screen];
NSDictionary *options = [[NSWorkspace sharedWorkspace] desktopImageOptionsForScreen:screen];
[[NSWorkspace sharedWorkspace] setDesktopImageURL:url forScreen:screen options:options error:nil];
}
}
@catch (NSException *exception) {
NSLog(@"Exception:" );
Expand Down

0 comments on commit d0c288c

Please sign in to comment.