Advertisement
dominus

Untitled

Apr 19th, 2020
1,202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.14 KB | None | 0 0
  1. diff --git a/exult.cc b/exult.cc
  2. index 60911980..a199878f 100644
  3. --- a/exult.cc
  4. +++ b/exult.cc
  5. @@ -1270,6 +1270,7 @@ static void Handle_event(
  6.         break;
  7.     }
  8.     case SDL_MOUSEBUTTONDOWN: {
  9. +       SDL_SetWindowGrab(gwin->get_win()->get_screen_window(), SDL_TRUE);
  10.         if (dont_move_mode)
  11.             break;
  12.         last_b1down_click = SDL_GetTicks();
  13. @@ -1393,6 +1394,7 @@ static void Handle_event(
  14.         break;
  15.     }
  16.     case SDL_MOUSEBUTTONUP: {
  17. +       SDL_SetWindowGrab(gwin->get_win()->get_screen_window(), SDL_FALSE);
  18.         if (dont_move_mode)
  19.             break;
  20.         int x ;
  21. @@ -1659,6 +1661,7 @@ static bool Get_click(
  22.         while (SDL_PollEvent(&event))
  23.             switch (event.type) {
  24.             case SDL_MOUSEBUTTONDOWN:
  25. +               SDL_SetWindowGrab(gwin->get_win()->get_screen_window(), SDL_TRUE);
  26.                 if (g_shortcutBar && g_shortcutBar->handle_event(&event))
  27.                     break;
  28.                 if (event.button.button == 3)
  29. @@ -1670,6 +1673,7 @@ static bool Get_click(
  30.                 }
  31.                 break;
  32.             case SDL_MOUSEBUTTONUP:
  33. +               SDL_SetWindowGrab(gwin->get_win()->get_screen_window(), SDL_FALSE);
  34.                 if (g_shortcutBar && g_shortcutBar->handle_event(&event))
  35.                     break;
  36.                 if (event.button.button == 1) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement