Merge remote-tracking branch 'upstream/main' into wlroots-next
This commit is contained in:
commit
bf35e77811
23
dwl.c
23
dwl.c
@ -523,7 +523,8 @@ arrangelayers(Monitor *m)
|
||||
/* Find topmost keyboard interactive layer, if such a layer exists */
|
||||
for (i = 0; i < LENGTH(layers_above_shell); i++) {
|
||||
wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) {
|
||||
if (!locked && l->layer_surface->current.keyboard_interactive && l->mapped) {
|
||||
if (locked || !l->layer_surface->current.keyboard_interactive || !l->mapped)
|
||||
continue;
|
||||
/* Deactivate the focused client. */
|
||||
focusclient(NULL, 0);
|
||||
exclusive_focus = l;
|
||||
@ -532,7 +533,6 @@ arrangelayers(Monitor *m)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
axisnotify(struct wl_listener *listener, void *data)
|
||||
@ -1359,16 +1359,15 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
||||
* processing keys, rather than passing them on to the client for its own
|
||||
* processing.
|
||||
*/
|
||||
int handled = 0;
|
||||
const Key *k;
|
||||
for (k = keys; k < END(keys); k++) {
|
||||
if (CLEANMASK(mods) == CLEANMASK(k->mod)
|
||||
&& sym == k->keysym && k->func) {
|
||||
k->func(&k->arg);
|
||||
handled = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return handled;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1393,9 +1392,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 && event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
||||
for (i = 0; i < nsyms; i++)
|
||||
handled = keybinding(mods, syms[i]) || handled;
|
||||
}
|
||||
|
||||
if (handled && group->wlr_group->keyboard.repeat_info.delay > 0) {
|
||||
group->mods = mods;
|
||||
@ -2387,6 +2387,10 @@ setup(void)
|
||||
|
||||
wlr_scene_set_presentation(scene, wlr_presentation_create(dpy, backend));
|
||||
|
||||
/* Make sure XWayland clients don't connect to the parent X server,
|
||||
* e.g when running in the x11 backend or the wayland backend and the
|
||||
* compositor has Xwayland support */
|
||||
unsetenv("DISPLAY");
|
||||
#ifdef XWAYLAND
|
||||
/*
|
||||
* Initialise the XWayland X server.
|
||||
@ -2557,10 +2561,10 @@ unmapnotify(struct wl_listener *listener, void *data)
|
||||
}
|
||||
|
||||
if (client_is_unmanaged(c)) {
|
||||
if (c == exclusive_focus)
|
||||
if (c == exclusive_focus) {
|
||||
exclusive_focus = NULL;
|
||||
if (client_surface(c) == seat->keyboard_state.focused_surface)
|
||||
focusclient(focustop(selmon), 1);
|
||||
}
|
||||
} else {
|
||||
wl_list_remove(&c->link);
|
||||
setmon(c, NULL, 0);
|
||||
@ -2600,10 +2604,11 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
m->m = m->w = (struct wlr_box){0};
|
||||
}
|
||||
/* Insert outputs that need to */
|
||||
wl_list_for_each(m, &mons, link)
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
if (m->wlr_output->enabled
|
||||
&& !wlr_output_layout_get(output_layout, m->wlr_output))
|
||||
wlr_output_layout_add_auto(output_layout, m->wlr_output);
|
||||
}
|
||||
|
||||
/* Now that we update the output layout we can get its box */
|
||||
wlr_output_layout_get_box(output_layout, NULL, &sgeom);
|
||||
|
Loading…
Reference in New Issue
Block a user