From 6b158b8a0bc28a5edebc4aa52c8456807dd8837e Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 29 Sep 2014 15:59:37 +1000 Subject: [PATCH] Move mouse initialisation to a better spot --- drivers/multiple/X/gdisp_lld_X.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/multiple/X/gdisp_lld_X.c b/drivers/multiple/X/gdisp_lld_X.c index 0462d0d6..e6136b49 100644 --- a/drivers/multiple/X/gdisp_lld_X.c +++ b/drivers/multiple/X/gdisp_lld_X.c @@ -254,6 +254,11 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { XSetBackground(dis, priv->gc, BlackPixel(dis, scr)); XSync(dis, TRUE); + // Create the associated mouse before the map + #if GINPUT_NEED_MOUSE + priv->mouse = (GMouse *)gdriverRegister((const GDriverVMT const *)GMOUSE_DRIVER_VMT, g); + #endif + XSelectInput(dis, priv->win, StructureNotifyMask); XMapWindow(dis, priv->win); @@ -269,11 +274,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { g->g.Width = GDISP_SCREEN_WIDTH; g->g.Height = GDISP_SCREEN_HEIGHT; - // Create the associated mouse - #if GINPUT_NEED_MOUSE - priv->mouse = (GMouse *)gdriverRegister((const GDriverVMT const *)GMOUSE_DRIVER_VMT, g); - #endif - return TRUE; }