mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
5c90ed9d2d
commit
03ec24502d
@@ -1003,7 +1003,7 @@ void wFrameWindowPaint(WFrameWindow * fwin)
|
|||||||
int titlelen;
|
int titlelen;
|
||||||
int allButtons = 1;
|
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)
|
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
|
||||||
lofs += fwin->left_button->width + 3;
|
lofs += fwin->left_button->width + 3;
|
||||||
else
|
else
|
||||||
@@ -1266,7 +1266,7 @@ static void checkTitleSize(WFrameWindow * fwin)
|
|||||||
width = fwin->titlebar->width - 6 - 6;
|
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)
|
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
|
||||||
width -= fwin->left_button->width + 3;
|
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;
|
x = (button->width - width) / 2 + d;
|
||||||
y = (button->height - image->height) / 2 + d;
|
y = (button->height - image->height) / 2 + d;
|
||||||
XSetClipOrigin(dpy, copy_gc, x - left, y);
|
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);
|
XSetForeground(dpy, copy_gc, scr->black_pixel);
|
||||||
if (!pushed) {
|
if (!pushed) {
|
||||||
if (image->depth == 1)
|
if (image->depth == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user