Apply suggestions from code review
Co-authored-by: Aire-One <aireone@aireone.xyz>
This commit is contained in:
parent
f6eef228e2
commit
5f58bc3195
|
@ -1658,15 +1658,15 @@ luaA_screen_get_name(lua_State *L, screen_t *s)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the content of the active screen as a cairo surface
|
/** Get the content of the active screen as a cairo surface.
|
||||||
*
|
*
|
||||||
* @return A cairo surface
|
* @property content
|
||||||
* @staticfct content
|
* @tparam surface A cairo surface with the screen content.
|
||||||
|
* @see gears.surface
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
luaA_screen_get_content(lua_State *L, screen_t *s)
|
luaA_screen_get_content(lua_State *L, screen_t *s)
|
||||||
{
|
{
|
||||||
|
|
||||||
cairo_surface_t *root_surface;
|
cairo_surface_t *root_surface;
|
||||||
cairo_surface_t *scrn_surface;
|
cairo_surface_t *scrn_surface;
|
||||||
cairo_t *scrn_cr;
|
cairo_t *scrn_cr;
|
||||||
|
@ -1706,7 +1706,6 @@ luaA_screen_get_content(lua_State *L, screen_t *s)
|
||||||
lua_pushlightuserdata(L, scrn_surface);
|
lua_pushlightuserdata(L, scrn_surface);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
9
root.c
9
root.c
|
@ -501,15 +501,15 @@ luaA_root_wallpaper(lua_State *L)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Get the content of the root window as a cairo surface
|
/** Get the content of the root window as a cairo surface.
|
||||||
*
|
*
|
||||||
* @return A cairo surface
|
* @property content
|
||||||
* @staticfct content
|
* @tparam surface A cairo surface with the root window content (aka the whole surface from every screens).
|
||||||
|
* @see gears.surface
|
||||||
*/
|
*/
|
||||||
static int
|
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 width = globalconf.screen->width_in_pixels;
|
||||||
int height = globalconf.screen->height_in_pixels;
|
int height = globalconf.screen->height_in_pixels;
|
||||||
|
@ -521,7 +521,6 @@ luaA_root_get_content(lua_State *L)
|
||||||
|
|
||||||
lua_pushlightuserdata(L, surface);
|
lua_pushlightuserdata(L, surface);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue