|
Lines 29-34
Link Here
|
| 29 |
Bool |
29 |
Bool |
| 30 |
fbCloseScreen(ScreenPtr pScreen) |
30 |
fbCloseScreen(ScreenPtr pScreen) |
| 31 |
{ |
31 |
{ |
|
|
32 |
FbScreenPrivPtr screen_priv = fbGetScreenPrivate(pScreen); |
| 32 |
int d; |
33 |
int d; |
| 33 |
DepthPtr depths = pScreen->allowedDepths; |
34 |
DepthPtr depths = pScreen->allowedDepths; |
| 34 |
|
35 |
|
|
Lines 37-45
fbCloseScreen(ScreenPtr pScreen)
Link Here
|
| 37 |
free(depths[d].vids); |
38 |
free(depths[d].vids); |
| 38 |
free(depths); |
39 |
free(depths); |
| 39 |
free(pScreen->visuals); |
40 |
free(pScreen->visuals); |
| 40 |
if (pScreen->devPrivate) |
41 |
|
| 41 |
FreePixmap((PixmapPtr)pScreen->devPrivate); |
42 |
pScreen->CloseScreen = screen_priv->CloseScreen; |
| 42 |
return TRUE; |
43 |
|
|
|
44 |
return pScreen->CloseScreen(pScreen); |
| 43 |
} |
45 |
} |
| 44 |
|
46 |
|
| 45 |
Bool |
47 |
Bool |
|
Lines 144-149
fbFinishScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize,
Link Here
|
| 144 |
int dpix, int dpiy, int width, int bpp) |
146 |
int dpix, int dpiy, int width, int bpp) |
| 145 |
#endif |
147 |
#endif |
| 146 |
{ |
148 |
{ |
|
|
149 |
FbScreenPrivPtr screen_priv; |
| 147 |
VisualPtr visuals; |
150 |
VisualPtr visuals; |
| 148 |
DepthPtr depths; |
151 |
DepthPtr depths; |
| 149 |
int nvisuals; |
152 |
int nvisuals; |
|
Lines 177-184
fbFinishScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize,
Link Here
|
| 177 |
rootdepth, ndepths, depths, |
180 |
rootdepth, ndepths, depths, |
| 178 |
defaultVisual, nvisuals, visuals)) |
181 |
defaultVisual, nvisuals, visuals)) |
| 179 |
return FALSE; |
182 |
return FALSE; |
| 180 |
/* overwrite miCloseScreen with our own */ |
183 |
|
|
|
184 |
screen_priv = fbGetScreenPrivate(pScreen); |
| 185 |
screen_priv->CloseScreen = pScreen->CloseScreen; |
| 181 |
pScreen->CloseScreen = fbCloseScreen; |
186 |
pScreen->CloseScreen = fbCloseScreen; |
|
|
187 |
|
| 182 |
return TRUE; |
188 |
return TRUE; |
| 183 |
} |
189 |
} |
| 184 |
|
190 |
|