Fix bad self on cursor:output_at_pos

This commit is contained in:
buffet 2021-07-30 20:49:39 +00:00
parent 4026cd0ef0
commit d3c5bb27e5

View file

@ -26,13 +26,13 @@ static int
l_kiwmi_cursor_output_at_pos(lua_State *L)
{
struct kiwmi_object *obj =
*(struct kiwmi_object **)luaL_checkudata(L, 1, "kiwmi_server");
*(struct kiwmi_object **)luaL_checkudata(L, 1, "kiwmi_cursor");
struct kiwmi_cursor *cursor = obj->object;
struct kiwmi_server *server = cursor->server;
struct wlr_output *wlr_output = wlr_output_layout_output_at(
server->desktop.output_layout, cursor->cursor->x, cursor->cursor->y);
server->desktop.output_layout,cursor->cursor->x, cursor->cursor->y);
if (wlr_output) {
lua_pushcfunction(L, luaK_kiwmi_output_new);