aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-07-31 13:24:10 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-07-31 13:24:10 -0500
commit0a59f47c18a0fd033f62640f5b94a78fc9b3e929 (patch)
tree47e9535b4cea9a631743089c9d8cf35a5a53c64b
parent50aa44c59b97c59f08dc482fa9d93bd1dc281ab0 (diff)
remove now-unused variables in focusclient
-rw-r--r--dwl.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/dwl.c b/dwl.c
index f0c599b..7cc022d 100644
--- a/dwl.c
+++ b/dwl.c
@@ -683,9 +683,6 @@ focusclient(Client *c, struct wlr_surface *surface, int lift)
{
Client *sel = selclient();
struct wlr_keyboard *kb;
- /* Previous and new xdg toplevel surfaces */
- Client *ptl = sel;
- Client *tl = c;
/* Previously 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
* accordingly, e.g. show/hide a caret.
*/
- if (tl != ptl && ptl) {
- if (ptl->type != XDGShell)
- wlr_xwayland_surface_activate(ptl->xwayland_surface, 0);
+ if (c != sel && sel) {
+ if (sel->type != XDGShell)
+ wlr_xwayland_surface_activate(sel->xwayland_surface, 0);
else
- wlr_xdg_toplevel_set_activated(ptl->xdg_surface, 0);
+ wlr_xdg_toplevel_set_activated(sel->xdg_surface, 0);
}
- if (tl) {
- if (tl->type != XDGShell)
- wlr_xwayland_surface_activate(tl->xwayland_surface, 1);
+ if (c) {
+ if (c->type != XDGShell)
+ wlr_xwayland_surface_activate(c->xwayland_surface, 1);
else
- wlr_xdg_toplevel_set_activated(tl->xdg_surface, 1);
+ wlr_xdg_toplevel_set_activated(c->xdg_surface, 1);
}
}