Update root.c

Remove unnecessary function variables width and height, as they do not add any real value, and rather pass these as all other arguments are (such as the connection), giving the routine a uniform look.

Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
This commit is contained in:
poisson-aerohead 2021-10-01 11:39:01 -07:00 committed by Emmanuel Lepage Vallee
parent 02e12f4cb4
commit 7a786dab1d
1 changed files with 2 additions and 3 deletions

5
root.c
View File

@ -511,13 +511,12 @@ static int
luaA_root_get_content(lua_State *L) luaA_root_get_content(lua_State *L)
{ {
cairo_surface_t *surface; cairo_surface_t *surface;
int width = globalconf.screen->width_in_pixels;
int height = globalconf.screen->height_in_pixels;
surface = cairo_xcb_surface_create(globalconf.connection, surface = cairo_xcb_surface_create(globalconf.connection,
globalconf.screen->root, globalconf.screen->root,
globalconf.default_visual, globalconf.default_visual,
width, height); globalconf.screen->width_in_pixels,
globalconf.screen->height_in_pixels);
lua_pushlightuserdata(L, surface); lua_pushlightuserdata(L, surface);
return 1; return 1;