diff options
author | sinanmohd <pcmsinan@gmail.com> | 2023-03-12 08:23:16 +0530 |
---|---|---|
committer | sinanmohd <pcmsinan@gmail.com> | 2023-03-12 15:02:42 +0530 |
commit | 63aef569a297ad7be5af07818b15fca40407e740 (patch) | |
tree | b009b9fd0bfd66c879f6050f9a46260df1b6f617 | |
parent | 2b762d51db37f09e0c2b55f25f09adba830309bc (diff) |
swallow: don't redeclare vars in scope
-rw-r--r-- | dwl.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1057,7 +1057,7 @@ createpointer(struct wlr_pointer *pointer) if (libinput_device_config_scroll_get_methods(libinput_device) != LIBINPUT_CONFIG_SCROLL_NO_SCROLL) libinput_device_config_scroll_set_method (libinput_device, scroll_method); - + if (libinput_device_config_click_get_methods(libinput_device) != LIBINPUT_CONFIG_CLICK_METHOD_NONE) libinput_device_config_click_set_method (libinput_device, click_method); @@ -1576,7 +1576,7 @@ void mapnotify(struct wl_listener *listener, void *data) { /* Called when the surface is mapped, or ready to display on-screen. */ - Client *p, *w, *c = wl_container_of(listener, c, map); + Client *p, *w, *t, *c = wl_container_of(listener, c, map); Monitor *m; int i; @@ -1638,15 +1638,15 @@ mapnotify(struct wl_listener *listener, void *data) printstatus(); if (!c->noswallow) { - Client *p = termforwin(c); - if (p) { - c->swallowedby = p; - p->swallowing = c; + t = termforwin(c); + if (t) { + c->swallowedby = t; + t->swallowing = c; wl_list_remove(&c->link); wl_list_remove(&c->flink); - swallow(c,p); - wl_list_remove(&p->link); - wl_list_remove(&p->flink); + swallow(c,t); + wl_list_remove(&t->link); + wl_list_remove(&t->flink); arrange(c->mon); } } @@ -2922,3 +2922,4 @@ main(int argc, char *argv[]) usage: die("Usage: %s [-v] [-s startup command]", argv[0]); } + |