From dcc743047b903af8ba409ed25745f891234dc323 Mon Sep 17 00:00:00 2001 From: Johannes Schramm Date: Sun, 21 Jan 2018 16:28:21 +0100 Subject: style: include brackets for if/while/for, even if it's a single statement --- xwayland/xwm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xwayland/xwm.c') diff --git a/xwayland/xwm.c b/xwayland/xwm.c index dc349ab2..13e99040 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -480,12 +480,15 @@ static void read_surface_net_wm_state(struct wlr_xwm *xwm, xsurface->fullscreen = 0; xcb_atom_t *atom = xcb_get_property_value(reply); for (uint32_t i = 0; i < reply->value_len; i++) { - if (atom[i] == xwm->atoms[_NET_WM_STATE_FULLSCREEN]) + if (atom[i] == xwm->atoms[_NET_WM_STATE_FULLSCREEN]) { xsurface->fullscreen = true; - if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_VERT]) + } + if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_VERT]) { xsurface->maximized_vert = true; - if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_HORZ]) + } + if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_HORZ]) { xsurface->maximized_horz = true; + } } } -- cgit v1.2.3 From 47eb478c35b109f520323af5013d47ad7ddc0824 Mon Sep 17 00:00:00 2001 From: Johannes Schramm Date: Sun, 21 Jan 2018 17:04:23 +0100 Subject: style: add else keywords in xwm.c --- xwayland/xwm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xwayland/xwm.c') diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 13e99040..aada6501 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -482,11 +482,9 @@ static void read_surface_net_wm_state(struct wlr_xwm *xwm, for (uint32_t i = 0; i < reply->value_len; i++) { if (atom[i] == xwm->atoms[_NET_WM_STATE_FULLSCREEN]) { xsurface->fullscreen = true; - } - if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_VERT]) { + } else if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_VERT]) { xsurface->maximized_vert = true; - } - if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_HORZ]) { + } else if (atom[i] == xwm->atoms[_NET_WM_STATE_MAXIMIZED_HORZ]) { xsurface->maximized_horz = true; } } -- cgit v1.2.3