remove now-unused variables in focusclient

This commit is contained in:
Devin J. Pohly 2020-07-31 13:24:10 -05:00
parent 50aa44c59b
commit 0a59f47c18

19
dwl.c
View File

@ -683,9 +683,6 @@ focusclient(Client *c, struct wlr_surface *surface, int lift)
{ {
Client *sel = selclient(); Client *sel = selclient();
struct wlr_keyboard *kb; struct wlr_keyboard *kb;
/* Previous and new xdg toplevel surfaces */
Client *ptl = sel;
Client *tl = c;
/* Previously focused surface */ /* Previously focused surface */
struct wlr_surface *psurface = seat->keyboard_state.focused_surface; struct wlr_surface *psurface = seat->keyboard_state.focused_surface;
@ -728,17 +725,17 @@ focusclient(Client *c, struct wlr_surface *surface, int lift)
* activate the current one. This lets the clients know to repaint * activate the current one. This lets the clients know to repaint
* accordingly, e.g. show/hide a caret. * accordingly, e.g. show/hide a caret.
*/ */
if (tl != ptl && ptl) { if (c != sel && sel) {
if (ptl->type != XDGShell) if (sel->type != XDGShell)
wlr_xwayland_surface_activate(ptl->xwayland_surface, 0); wlr_xwayland_surface_activate(sel->xwayland_surface, 0);
else else
wlr_xdg_toplevel_set_activated(ptl->xdg_surface, 0); wlr_xdg_toplevel_set_activated(sel->xdg_surface, 0);
} }
if (tl) { if (c) {
if (tl->type != XDGShell) if (c->type != XDGShell)
wlr_xwayland_surface_activate(tl->xwayland_surface, 1); wlr_xwayland_surface_activate(c->xwayland_surface, 1);
else else
wlr_xdg_toplevel_set_activated(tl->xdg_surface, 1); wlr_xdg_toplevel_set_activated(c->xdg_surface, 1);
} }
} }