From 03ec24502d229803821cbf3bd795a244cfd54018 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 8 Aug 2021 09:36:13 +0200 Subject: [PATCH] WMaker: Fix logical-not operator in framewin.c As reported by clang, (!wPreferences.new_style == TS_NEW) inverts the "wPreferences.new_style" and not the whole expression. Use the appropriate comparison operator to avoid misunderstanding. --- src/framewin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/framewin.c b/src/framewin.c index 4233360d..3f03aa59 100644 --- a/src/framewin.c +++ b/src/framewin.c @@ -1003,7 +1003,7 @@ void wFrameWindowPaint(WFrameWindow * fwin) int titlelen; int allButtons = 1; - if (!wPreferences.new_style == TS_NEW) { + if (wPreferences.new_style != TS_NEW) { if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit) lofs += fwin->left_button->width + 3; else @@ -1266,7 +1266,7 @@ static void checkTitleSize(WFrameWindow * fwin) width = fwin->titlebar->width - 6 - 6; } - if (!wPreferences.new_style == TS_NEW) { + if (wPreferences.new_style != TS_NEW) { if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit) width -= fwin->left_button->width + 3; @@ -1352,7 +1352,7 @@ static void paintButton(WCoreWindow * button, WTexture * texture, unsigned long x = (button->width - width) / 2 + d; y = (button->height - image->height) / 2 + d; XSetClipOrigin(dpy, copy_gc, x - left, y); - if (!wPreferences.new_style == TS_NEW) { + if (wPreferences.new_style != TS_NEW) { XSetForeground(dpy, copy_gc, scr->black_pixel); if (!pushed) { if (image->depth == 1)