|
|
|
@@ -294,7 +294,7 @@ static void gpureset(struct wl_listener *listener, void *data);
|
|
|
|
|
static void handlesig(int signo);
|
|
|
|
|
static void incnmaster(const Arg *arg);
|
|
|
|
|
static void inputdevice(struct wl_listener *listener, void *data);
|
|
|
|
|
static int keybinding(uint32_t mods, xkb_keysym_t sym);
|
|
|
|
|
static int keybinding(uint32_t mods, xkb_keysym_t sym, bool run_func);
|
|
|
|
|
static void keypress(struct wl_listener *listener, void *data);
|
|
|
|
|
static void keypressmod(struct wl_listener *listener, void *data);
|
|
|
|
|
static int keyrepeat(void *data);
|
|
|
|
@@ -803,8 +803,10 @@ commitnotify(struct wl_listener *listener, void *data)
|
|
|
|
|
* a wrong monitor.
|
|
|
|
|
*/
|
|
|
|
|
applyrules(c);
|
|
|
|
|
wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale));
|
|
|
|
|
wlr_fractional_scale_v1_notify_scale(client_surface(c), c->mon->wlr_output->scale);
|
|
|
|
|
if (c->mon) {
|
|
|
|
|
wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale));
|
|
|
|
|
wlr_fractional_scale_v1_notify_scale(client_surface(c), c->mon->wlr_output->scale);
|
|
|
|
|
}
|
|
|
|
|
setmon(c, NULL, 0); /* Make sure to reapply rules in mapnotify() */
|
|
|
|
|
|
|
|
|
|
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
|
|
|
@@ -1175,7 +1177,6 @@ void
|
|
|
|
|
destroydecoration(struct wl_listener *listener, void *data)
|
|
|
|
|
{
|
|
|
|
|
Client *c = wl_container_of(listener, c, destroy_decoration);
|
|
|
|
|
c->decoration = NULL;
|
|
|
|
|
|
|
|
|
|
wl_list_remove(&c->destroy_decoration.link);
|
|
|
|
|
wl_list_remove(&c->set_decoration_mode.link);
|
|
|
|
@@ -1555,7 +1556,7 @@ inputdevice(struct wl_listener *listener, void *data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
keybinding(uint32_t mods, xkb_keysym_t sym)
|
|
|
|
|
keybinding(uint32_t mods, xkb_keysym_t sym, bool run_func)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* Here we handle compositor keybindings. This is when the compositor is
|
|
|
|
@@ -1566,7 +1567,8 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
|
|
|
|
for (k = keys; k < END(keys); k++) {
|
|
|
|
|
if (CLEANMASK(mods) == CLEANMASK(k->mod)
|
|
|
|
|
&& sym == k->keysym && k->func) {
|
|
|
|
|
k->func(&k->arg);
|
|
|
|
|
if (run_func)
|
|
|
|
|
k->func(&k->arg);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1595,9 +1597,10 @@ keypress(struct wl_listener *listener, void *data)
|
|
|
|
|
|
|
|
|
|
/* On _press_ if there is no active screen locker,
|
|
|
|
|
* attempt to process a compositor keybinding. */
|
|
|
|
|
if (!locked && event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
|
|
|
|
if (!locked) {
|
|
|
|
|
bool run_func = event->state == WL_KEYBOARD_KEY_STATE_PRESSED;
|
|
|
|
|
for (i = 0; i < nsyms; i++)
|
|
|
|
|
handled = keybinding(mods, syms[i]) || handled;
|
|
|
|
|
handled = keybinding(mods, syms[i], run_func) || handled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (handled && group->wlr_group->keyboard.repeat_info.delay > 0) {
|
|
|
|
@@ -1645,7 +1648,7 @@ keyrepeat(void *data)
|
|
|
|
|
1000 / group->wlr_group->keyboard.repeat_info.rate);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < group->nsyms; i++)
|
|
|
|
|
keybinding(group->mods, group->keysyms[i]);
|
|
|
|
|
keybinding(group->mods, group->keysyms[i], true);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@@ -3141,7 +3144,7 @@ sethints(struct wl_listener *listener, void *data)
|
|
|
|
|
{
|
|
|
|
|
Client *c = wl_container_of(listener, c, set_hints);
|
|
|
|
|
struct wlr_surface *surface = client_surface(c);
|
|
|
|
|
if (c == focustop(selmon))
|
|
|
|
|
if (c == focustop(selmon) || !c->surface.xwayland->hints)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);
|
|
|
|
|