Skip to content

Commit

Permalink
FIX: make native widgets to lose focus when user clicks with mouse an…
Browse files Browse the repository at this point in the history
…ywhere outside
  • Loading branch information
Oldes committed Mar 8, 2019
1 parent 354e5fe commit dd1edab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/os/win32/host-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ static REBINT Check_Modifiers(REBINT flags)
//if (!WIN_CAPTURED(wp)) {
flags = Check_Modifiers(flags);
Add_Event_XY(gob, EVT_DOWN, xy, flags);
SetFocus(hwnd);
SetCapture(hwnd);
//WIN_CAPTURED(wp) = EVT_BTN1_UP;
break;
Expand All @@ -368,6 +369,7 @@ static REBINT Check_Modifiers(REBINT flags)
//if (!WIN_CAPTURED(wp)) {
flags = Check_Modifiers(flags);
Add_Event_XY(gob, EVT_ALT_DOWN, xy, flags);
SetFocus(hwnd);
SetCapture(hwnd);
//WIN_CAPTURED(wp) = EVT_BTN2_UP;
break;
Expand All @@ -386,6 +388,7 @@ static REBINT Check_Modifiers(REBINT flags)
//if (!WIN_CAPTURED(wp)) {
flags = Check_Modifiers(flags);
Add_Event_XY(gob, EVT_AUX_DOWN, xy, flags);
SetFocus(hwnd);
SetCapture(hwnd);
break;

Expand Down

0 comments on commit dd1edab

Please sign in to comment.