Move mouse initialisation to a better spot

ugfx_release_2.6
inmarket 2014-09-29 15:59:37 +10:00
parent a873d55173
commit 6b158b8a0b
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}