mirror of https://github.com/libsdl-org/SDL
Mir: Handle close window events
This commit is contained in:
parent
0cba684794
commit
7cd39b7d15
|
@ -285,6 +285,11 @@ HandleWindow(MirWindowEvent const* event, SDL_Window* window)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
MIR_HandleClose(SDL_Window* window) {
|
||||||
|
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_CLOSE, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIR_HandleEvent(MirWindow* mirwindow, MirEvent const* ev, void* context)
|
MIR_HandleEvent(MirWindow* mirwindow, MirEvent const* ev, void* context)
|
||||||
{
|
{
|
||||||
|
@ -302,6 +307,9 @@ MIR_HandleEvent(MirWindow* mirwindow, MirEvent const* ev, void* context)
|
||||||
case (mir_event_type_window):
|
case (mir_event_type_window):
|
||||||
HandleWindow(MIR_mir_event_get_window_event(ev), window);
|
HandleWindow(MIR_mir_event_get_window_event(ev), window);
|
||||||
break;
|
break;
|
||||||
|
case (mir_event_type_close_window):
|
||||||
|
MIR_HandleClose(window);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue