Move mouse initialisation to a better spot
This commit is contained in:
parent
a873d55173
commit
6b158b8a0b
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue