Skip to content
This repository
Browse code

Merge pull request #940 from pjrobertson/toggle

Make the 'toggle' action smarter - fixes #939
  • Loading branch information...
commit dbc139058d2ab14d3f7bc1623e0f3efea604e6c3 2 parents 59255b0 + 1e8cf41
Rob McBroom skurfer authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 Quicksilver/Code-QuickStepCore/QSProcessSource.m
10 Quicksilver/Code-QuickStepCore/QSProcessSource.m
@@ -125,13 +125,13 @@ - (QSObject *)toggleApplication:(QSObject *)dObject {
125 125 NSArray *array = [dObject arrayForType:QSProcessType];
126 126 //NSLog(@"arr %@", array);
127 127 if (array) {
128   - if ([[NSWorkspace sharedWorkspace] applicationIsHidden:[array lastObject]]) {
  128 + if ([[NSWorkspace sharedWorkspace] applicationIsFrontmost:[array lastObject]]) {
129 129 // NSLog(@"showing");
130   - [[NSWorkspace sharedWorkspace] performSelector:@selector(activateApplication:) onObjectsInArray:array
131   - returnValues:NO];
  130 + [[NSWorkspace sharedWorkspace] performSelector:@selector(hideApplication:) onObjectsInArray:array
  131 + returnValues:NO];
132 132 } else {
133   - [[NSWorkspace sharedWorkspace] performSelector:@selector(hideApplication:) onObjectsInArray:array
134   - returnValues:NO];
  133 + [[NSWorkspace sharedWorkspace] performSelector:@selector(activateApplication:) onObjectsInArray:array
  134 + returnValues:NO];
135 135 }
136 136 } else {
137 137 array = [dObject validPaths];

0 comments on commit dbc1390

Please sign in to comment.
Something went wrong with that request. Please try again.