mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
realloc smaller if xinerama_screen_number != screen registered
This commit is contained in:
parent
e84d614377
commit
5922d3a257
1 changed files with 9 additions and 1 deletions
10
screen.c
10
screen.c
|
@ -179,7 +179,15 @@ screen_build_screens(void)
|
|||
globalconf.screens[globalconf.nscreens++].geometry = screen_xsi_to_area(si[screen]);
|
||||
}
|
||||
|
||||
/* XXX realloc smaller if xinerama_screen_number != screen registered */
|
||||
/* realloc smaller if xinerama_screen_number != screen registered */
|
||||
if(xinerama_screen_number != globalconf.nscreens)
|
||||
{
|
||||
VirtScreen *newscreens = p_new(VirtScreen, globalconf.nscreens);
|
||||
memcpy(newscreens, globalconf.screens, globalconf.nscreens * sizeof(VirtScreen));
|
||||
p_delete(&globalconf.screens);
|
||||
globalconf.screens = newscreens;
|
||||
}
|
||||
|
||||
XFree(si);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue