Having the delay for showing the Switcher window based on the keyboard delay

seemed odd to me. The default settings made it feel too slow in coming up, and
even the fastest settings still felt awkward. So after some trial and error I
came up with a reasonable default that feels nice to me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood 2009-07-05 04:36:26 +00:00
parent 1c55ed0826
commit 9dfbf311cb
1 changed files with 5 additions and 8 deletions

View File

@ -658,14 +658,10 @@ TSwitchManager::_SortApps()
void void
TSwitchManager::MainEntry(BMessage* message) TSwitchManager::MainEntry(BMessage* message)
{ {
bigtime_t keyRepeatRate;
get_key_repeat_delay(&keyRepeatRate);
if (keyRepeatRate < 200000)
keyRepeatRate = 200000;
bigtime_t now = system_time(); bigtime_t now = system_time();
bigtime_t timeout = now + keyRepeatRate; bigtime_t timeout = now + 180000;
// The delay above was arrived at by trial and error and
// has a good "feel"
app_info appInfo; app_info appInfo;
be_roster->GetActiveAppInfo(&appInfo); be_roster->GetActiveAppInfo(&appInfo);
@ -702,7 +698,8 @@ TSwitchManager::MainEntry(BMessage* message)
QuickSwitch(message); QuickSwitch(message);
return; return;
} }
snooze(50000); snooze(20000);
// Must be a multiple of the delay used above
} }
Process((modifierKeys & B_SHIFT_KEY) == 0, Process((modifierKeys & B_SHIFT_KEY) == 0,