void uimon_window_suspend( void ) { ui_restore_focus(); #ifdef HAVE_MOUSE ui_check_mouse_cursor(); #endif }
/* Message Helper */ static void ui_message2(const GtkMessageType type, const char *msg, const char *title) { static GtkWidget* msgdlg; vsync_suspend_speed_eval(); msgdlg = gtk_message_dialog_new(GTK_WINDOW(get_active_toplevel()), GTK_DIALOG_DESTROY_WITH_PARENT, type, GTK_BUTTONS_OK, msg, NULL); ui_popup(msgdlg, title, FALSE); gtk_dialog_run(GTK_DIALOG(msgdlg)); ui_unblock_shells(); /* ui_popdown can't be used in message_boxes */ gtk_widget_destroy(msgdlg); /* still needed ? */ ui_check_mouse_cursor(); ui_dispatch_events(); }
static int fullscreen_enable(struct video_canvas_s *canvas, int enable) { SDL_Event e; int count; DBG(("%s: %i", __func__, enable)); if (!canvas->fullscreenconfig->device_set) { return 0; } canvas->fullscreenconfig->enable = enable; ui_check_mouse_cursor(); if (canvas->initialized) { /* resize window back to normal when leaving fullscreen */ video_viewport_resize(canvas, 1); /* HACK: when switching from/to fullscreen using hotkey (alt+d), some spurious keyup/keydown events fire for the keys being held down while switching modes. the following tries to get rid of these events, so "alt-d" doesnt end up in the emulated machine. */ count = 10; while (count--) { while (SDL_PollEvent(&e)) { switch (e.type) { case SDL_KEYDOWN: case SDL_KEYUP: sdlkbd_release(SDL2x_to_SDL1x_Keys(e.key.keysym.sym), e.key.keysym.mod); break; } } SDL_Delay(20); } } return 0; }
void mousedrv_mouse_changed(void) { ui_check_mouse_cursor(); }