diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 19f74d3a3..d52e757ac 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D2X-Rebirth Changelog -------- arch/sdl/event.c: Still send idle events when receiving SDL joystick events, fixing possible joystick issues main/menu.c: No referring to non-existent ogl_maxanisotropy for non-OGL build +main/kconfig.c, main/newmenu.c, ui/mouse.c: Fix cursor recentering issues - comment out redundant event_toggle_focus(1) calls in kconfig.c and newmenu.c and use event_toggle_focus(0) in ui_mouse_show() 20110116 -------- diff --git a/main/kconfig.c b/main/kconfig.c index 21a53827c..b142e5944 100644 --- a/main/kconfig.c +++ b/main/kconfig.c @@ -900,7 +900,7 @@ int kconfig_handler(window *wind, d_event *event, kc_menu *menu) break; case EVENT_WINDOW_CLOSE: - event_toggle_focus(1); + //event_toggle_focus(1); // No cursor recentering d_free(menu); // Update save values... diff --git a/main/newmenu.c b/main/newmenu.c index 14717b791..f5668b7d4 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -1500,7 +1500,7 @@ int newmenu_handler(window *wind, d_event *event, newmenu *menu) break; case EVENT_WINDOW_DEACTIVATED: - event_toggle_focus(1); + //event_toggle_focus(1); // No cursor recentering menu->mouse_state = 0; break; @@ -2083,7 +2083,7 @@ int listbox_handler(window *wind, d_event *event, listbox *lb) break; case EVENT_WINDOW_DEACTIVATED: - event_toggle_focus(1); + //event_toggle_focus(1); // No cursor recentering break; case EVENT_MOUSE_BUTTON_DOWN: diff --git a/ui/mouse.c b/ui/mouse.c index aab83ac1a..c713a1d42 100644 --- a/ui/mouse.c +++ b/ui/mouse.c @@ -105,7 +105,7 @@ int ui_mouse_find_gadget(short n) void ui_mouse_show() { #ifndef __MSDOS__ - SDL_ShowCursor(1); + event_toggle_focus(0); #else if (Mouse.hidden==1 ) { Mouse.hidden = 0; @@ -121,7 +121,9 @@ void ui_mouse_show() void ui_mouse_hide() { -#ifdef __MSDOS__ +#ifndef __MSDOS__ +// event_toggle_focus(1); // causes cursor to recenter +#else if (Mouse.hidden==0 ) { Mouse.hidden = 1; if (Mouse.bg_saved==1) {