diff options
-rw-r--r-- | drivers/multiple/X/gdisp_lld_X.c | 10 |
1 files 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; } |