| 511 | */ |
| 512 | |
| 513 | void quick::init() { |
| 514 | if (ipc_version.major == 1 && ipc_version.minor >= 5) { |
| 515 | if (quick_select.input_mode == InputMode::Auto) |
| 516 | quick_select.input_mode = InputMode::WmKey; |
| 517 | |
| 518 | IbDetourAttach(&DeferWindowPos_real, DeferWindowPos_detour); |
| 519 | //IbDetourAttach(&EndDeferWindowPos_real, EndDeferWindowPos_detour); |
| 520 | } |
| 521 | else { |
| 522 | if (quick_select.input_mode == InputMode::Auto) |
| 523 | quick_select.input_mode = InputMode::SendInput; |
| 524 | |
| 525 | IbDetourAttach(&SetWindowPos_real, SetWindowPos_detour); |
| 526 | } |
| 527 | |
| 528 | keyboard_hook = SetWindowsHookExW(WH_KEYBOARD, keyboard_proc, nullptr, GetCurrentThreadId()); |
| 529 | |
| 530 | if (quick_select.result_list.terminal_file.size()) { |
| 531 | IbDetourAttach(&CloseClipboard_real, CloseClipboard_detour); |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | void quick::destroy() { |
| 536 | if (quick_select.result_list.terminal_file.size()) { |
nothing calls this directly
no test coverage detected