diff --git a/event.c b/event.c index 920b09c74..ed36c5e06 100644 --- a/event.c +++ b/event.c @@ -223,7 +223,7 @@ event_handle_button(xcb_button_press_event_t *ev) XCB_ALLOW_ASYNC_POINTER, XCB_CURRENT_TIME); } - else if((c = client_getbyframewin(ev->event))) + else if((c = client_getbywin(ev->event))) { luaA_object_push(L, c); /* And handle the button raw button event */ diff --git a/objects/window.c b/objects/window.c index 15b582c86..9a8e03b06 100644 --- a/objects/window.c +++ b/objects/window.c @@ -63,7 +63,7 @@ luaA_window_buttons(lua_State *L) { luaA_button_array_set(L, 1, 2, &window->buttons); luaA_object_emit_signal(L, 1, "property::buttons", 0); - xwindow_buttons_grab(window_get(window), &window->buttons); + xwindow_buttons_grab(window->window, &window->buttons); } return luaA_button_array_get(L, 1, &window->buttons);