diff --git a/src/osdep/amiberry.cpp b/src/osdep/amiberry.cpp index f38d99dd0..c831d3979 100644 --- a/src/osdep/amiberry.cpp +++ b/src/osdep/amiberry.cpp @@ -615,11 +615,13 @@ bool ismouseactive (void) //TODO: maybe implement this void target_inputdevice_unacquire(bool full) { + struct AmigaMonitor* mon = &AMonitors[0]; //close_tablet(tablet); //tablet = NULL; - //if (full) { - // rawinput_release(); - //} + if (full) { + //rawinput_release(); + SDL_SetWindowGrab(mon->amiga_window, SDL_TRUE); + } } void target_inputdevice_acquire(void) { @@ -627,6 +629,7 @@ void target_inputdevice_acquire(void) target_inputdevice_unacquire(false); //tablet = open_tablet(mon->hAmigaWnd); //rawinput_alloc(); + SDL_SetWindowGrab(mon->amiga_window, SDL_TRUE); } static void setmouseactive2(struct AmigaMonitor* mon, int active, bool allowpause) diff --git a/src/osdep/amiberry_gui.cpp b/src/osdep/amiberry_gui.cpp index 9651e5609..a7617b463 100644 --- a/src/osdep/amiberry_gui.cpp +++ b/src/osdep/amiberry_gui.cpp @@ -542,6 +542,8 @@ void gui_display(int shortcut) setmouseactive(0, 1); } //rawinput_alloc(); + struct AmigaMonitor* mon = &AMonitors[0]; + SDL_SetWindowGrab(mon->amiga_window, SDL_TRUE); fpscounter_reset(); //screenshot_free(); //write_disk_history(); diff --git a/src/osdep/gui/main_window.cpp b/src/osdep/gui/main_window.cpp index bfd28357b..75b28d095 100644 --- a/src/osdep/gui/main_window.cpp +++ b/src/osdep/gui/main_window.cpp @@ -290,7 +290,7 @@ void amiberry_gui_init() Uint32 mode; if (sdl_mode.w >= 800 && sdl_mode.h >= 600 && !kmsdrm_detected) { - mode = SDL_WINDOW_RESIZABLE; + mode = SDL_WINDOW_RESIZABLE; if (currprefs.gui_alwaysontop) mode |= SDL_WINDOW_ALWAYS_ON_TOP; if (currprefs.start_minimized) @@ -372,6 +372,7 @@ void amiberry_gui_init() SDL_SetRelativeMouseMode(SDL_FALSE); SDL_ShowCursor(SDL_ENABLE); + SDL_SetWindowGrab(mon->gui_window, SDL_TRUE); SDL_RaiseWindow(mon->gui_window); //-------------------------------------------------