Remove focus on click
It's a config responsibility now.
This commit is contained in:
parent
861e4ec55a
commit
09b817deaa
2 changed files with 12 additions and 16 deletions
|
@ -92,22 +92,6 @@ cursor_button_notify(struct wl_listener *listener, void *data)
|
|||
|
||||
wlr_seat_pointer_notify_button(
|
||||
input->seat, event->time_msec, event->button, event->state);
|
||||
|
||||
double sx;
|
||||
double sy;
|
||||
struct wlr_surface *surface;
|
||||
|
||||
struct kiwmi_view *view = view_at(
|
||||
&server->desktop,
|
||||
cursor->cursor->x,
|
||||
cursor->cursor->y,
|
||||
&surface,
|
||||
&sx,
|
||||
&sy);
|
||||
|
||||
if (event->state == WLR_BUTTON_PRESSED) {
|
||||
focus_view(view);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
12
kiwmi/luak.c
12
kiwmi/luak.c
|
@ -87,8 +87,20 @@ l_kiwmi_view_close(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
l_kiwmi_view_focus(lua_State *L)
|
||||
{
|
||||
struct kiwmi_view *view =
|
||||
*(struct kiwmi_view **)luaL_checkudata(L, 1, "kiwmi_view");
|
||||
|
||||
focus_view(view);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const luaL_Reg kiwmi_view_methods[] = {
|
||||
{"close", l_kiwmi_view_close},
|
||||
{"focus", l_kiwmi_view_focus},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue