Misc mouse fixes

This commit is contained in:
eukos 2015-09-18 21:45:13 +02:00
parent 033d5440b0
commit 4385e4fa81

View file

@ -235,7 +235,7 @@ void VID_Init(unsigned char *palette)
vid.conheight = vid.height;
vid.aspect =
((float) vid.height / (float) vid.width) * (320.0 / 240.0);
mouse_enabled = true;
mouse_enabled = false;
gdk_window_get_geometry (gtk_widget_get_window(x_win), &vid_frame[0], &vid_frame[1], &vid_frame[2], &vid_frame[3], NULL);
gdk_window_get_position(gtk_widget_get_window(x_win), &vid_frame[0], &vid_frame[1]);
vid_center_x = (int)(((float)vid_frame[2] / 2) + vid_frame[0]);
@ -469,7 +469,6 @@ void GetEvent(void)
keyq_head = (keyq_head + 1) & 63;
break;
case GDK_ENTER_NOTIFY:
IN_ActivateMouse();
break;
case GDK_LEAVE_NOTIFY:
IN_DeactivateMouse();
@ -713,6 +712,8 @@ void IN_Move (usercmd_t *cmd)
if((mouse_x || mouse_y) && mouse_enabled)
gdk_display_warp_pointer (display, screen, vid_center_x, vid_center_y);
mouse_x = mouse_y = 0;
}
void IN_Commands()
{