Skip to content

Commit

Permalink
Enable mouse focus clickthrough in OTG mode
Browse files Browse the repository at this point in the history
A single click on the window must both give focus and capture the mouse.
  • Loading branch information
rom1v committed Jan 27, 2022
1 parent 0542b7b commit f8fdb76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/usb/scrcpy_otg.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ scrcpy_otg(struct scrcpy_options *options) {

atexit(SDL_Quit);

if (!SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1")) {
LOGW("Could not enable mouse focus clickthrough");
}

bool ret = false;

struct sc_hid_keyboard *keyboard = NULL;
Expand Down

0 comments on commit f8fdb76

Please sign in to comment.