Skip to content

Commit 01317ce

Browse files
committed
Workspace Desktops preferences: send notification on shortcut changes to WM.
1 parent 579755c commit 01317ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Applications/Workspace/Preferences/Desktops/DesktopsPrefs.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@
2020
*/
2121

2222
#import "DesktopsPrefs.h"
23+
2324
#import <SystemKit/OSEDefaults.h>
2425
#import <Workspace+WM.h>
2526
#import <Controller.h>
27+
#import <WMNotificationCenter.h>
2628

2729
#include <core/wuserdefaults.h>
2830
#include <desktop.h>
31+
#include <screen.h>
2932

3033
@interface DesktopsPrefs (Private)
3134
- (NSString *)_wmPreferencesPathForName:(NSString *)fileName;
@@ -328,6 +331,12 @@ - (void)setSwitchShortcut:(id)sender
328331
[wmDefaults setObject:[NSString stringWithFormat:@"%@+Left", prefix] forKey:@"PrevWorkspaceKey"];
329332
[wmDefaults writeToFile:[self _wmPreferencesPathForName:@"WM"] atomically:YES];
330333
[wmDefaults release];
334+
335+
// Specify notification name as string to omit redefinition confusion
336+
[[WMNotificationCenter defaultCenter]
337+
postNotificationName:@"WMDidChangeAppearanceSettingsNotification"
338+
object:@"GSWorkspaceNotification"
339+
userInfo:nil];
331340
}
332341
- (void)setDirectSwitchShortcut:(id)sender
333342
{

0 commit comments

Comments
 (0)