[Commits] SDL: Mir: Handle close window events

libsdl.org revision control commits-owner at libsdl.org
Tue Jan 16 12:42:38 PST 2018


details:   https://hg.libsdl.org/SDL/rev/13d922b387db
changeset: 11826:13d922b387db
user:      Marius Gripsgard <marius at ubports.com>
date:      Sat Jan 13 01:58:11 2018 +0100
description:
Mir: Handle close window events

diffstat:

 src/video/mir/SDL_mirevents.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 44536468cdd2 -r 13d922b387db src/video/mir/SDL_mirevents.c
--- a/src/video/mir/SDL_mirevents.c	Mon Jan 15 10:29:53 2018 -0800
+++ b/src/video/mir/SDL_mirevents.c	Sat Jan 13 01:58:11 2018 +0100
@@ -285,6 +285,11 @@
     }
 }
 
+static void
+MIR_HandleClose(SDL_Window* window) {
+    SDL_SendWindowEvent(window, SDL_WINDOWEVENT_CLOSE, 0, 0);
+}
+
 void
 MIR_HandleEvent(MirWindow* mirwindow, MirEvent const* ev, void* context)
 {
@@ -302,6 +307,9 @@
             case (mir_event_type_window):
                 HandleWindow(MIR_mir_event_get_window_event(ev), window);
                 break;
+            case (mir_event_type_close_window):
+                MIR_HandleClose(window);
+                break;
             default:
                 break;
         }


More information about the commits mailing list