Merge branch 'DreamMaoMao:wlroots-0.19' into wlroots-0.19

This commit is contained in:
Eden 2025-03-25 21:34:00 +08:00 committed by GitHub
commit 45209daa54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3131,10 +3131,6 @@ void focusclient(Client *c, int lift) {
if (c && client_surface(c) == old_keyboard_focus_surface)
return;
if (c && c->mon && c->mon != selmon) {
selmon = c->mon;
}
if (selmon && selmon->sel && selmon->sel->foreign_toplevel) {
wlr_foreign_toplevel_handle_v1_set_activated(selmon->sel->foreign_toplevel,
false);
@ -3497,7 +3493,7 @@ keypress(struct wl_listener *listener, void *data)
if (!locked && event->state == WL_KEYBOARD_KEY_STATE_RELEASED &&
(keycode == 133 || keycode == 37 || keycode == 64 || keycode == 50 ||
keycode == 134 || keycode == 105 || keycode == 108 || keycode == 62) &&
selmon->sel) {
selmon && selmon->sel) {
dwl_input_method_relay_set_focus(input_relay, client_surface(selmon->sel));
}
#endif
@ -4908,27 +4904,27 @@ void setsmfact(const Arg *arg) {
arrange(selmon, false);
}
void setmon(Client *c, Monitor *m, uint32_t newtags) {
Monitor *oldmon = c->mon;
void
setmon(Client *c, Monitor *m, uint32_t newtags)
{
Monitor *oldmon = c->mon;
if (oldmon == m)
return;
c->mon = m;
c->prev = c->geom;
if (oldmon == m)
return;
c->mon = m;
c->prev = c->geom;
/* Scene graph sends surface leave/enter events on move and resize */
if (oldmon)
arrange(oldmon, false);
if (m) {
/* Make sure window actually overlaps with the monitor */
resize(c, c->geom, 0);
c->tags = newtags
? newtags
: m->tagset[m->seltags]; /* assign tags of target monitor */
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
setfloating(c, c->isfloating);
}
focusclient(focustop(selmon), 1);
/* Scene graph sends surface leave/enter events on move and resize */
if (oldmon)
arrange(oldmon,false);
if (m) {
/* Make sure window actually overlaps with the monitor */
resize(c, c->geom, 0);
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
setfloating(c, c->isfloating);
}
focusclient(focustop(selmon), 1);
}
void