style: auto-format C/C++ sources with clang-format

This commit is contained in:
Leonmmcoset
2026-04-25 16:43:39 +00:00
committed by github-actions[bot]
parent 87d9e31385
commit 87944b62d8
5 changed files with 48 additions and 50 deletions

View File

@@ -1,9 +1,7 @@
#include "uwm.h"
static int ush_uwm_hit_close(const ush_uwm_window *win, int x, int y) {
return (win != (const ush_uwm_window *)0 && x >= win->w - USH_UWM_CONTROL_W && y >= 0 &&
y < USH_UWM_TITLE_H)
? 1
return (win != (const ush_uwm_window *)0 && x >= win->w - USH_UWM_CONTROL_W && y >= 0 && y < USH_UWM_TITLE_H) ? 1
: 0;
}
@@ -22,8 +20,7 @@ static int ush_uwm_hit_topmost(const ush_uwm_window *win, int x, int y) {
}
static int ush_uwm_hit_resize(const ush_uwm_window *win, int x, int y) {
return (win != (const ush_uwm_window *)0 && x >= win->w - USH_UWM_RESIZE_GRIP &&
y >= win->h - USH_UWM_RESIZE_GRIP)
return (win != (const ush_uwm_window *)0 && x >= win->w - USH_UWM_RESIZE_GRIP && y >= win->h - USH_UWM_RESIZE_GRIP)
? 1
: 0;
}
@@ -152,7 +149,8 @@ static void ush_uwm_handle_taskbar_click(ush_uwm_session *sess, int local_x, int
for (i = 0; i < (int)USH_UWM_APP_COUNT; i++) {
ush_uwm_window *app = &sess->windows[i];
if (local_x >= app_x && local_x < app_x + USH_UWM_TASKBAR_BUTTON_W && local_y >= 5 && local_y < taskbar->h - 5) {
if (local_x >= app_x && local_x < app_x + USH_UWM_TASKBAR_BUTTON_W && local_y >= 5 &&
local_y < taskbar->h - 5) {
if (app->alive != 0 && app->minimized == 0 && sess->active_window == i) {
ush_uwm_minimize_window(sess, i);
} else {

View File

@@ -1,8 +1,8 @@
#include "uwm.h"
#define UWM_GLYPH7(r0, r1, r2, r3, r4, r5, r6) \
(((u64)(r0) << 30U) | ((u64)(r1) << 25U) | ((u64)(r2) << 20U) | ((u64)(r3) << 15U) | \
((u64)(r4) << 10U) | ((u64)(r5) << 5U) | (u64)(r6))
(((u64)(r0) << 30U) | ((u64)(r1) << 25U) | ((u64)(r2) << 20U) | ((u64)(r3) << 15U) | ((u64)(r4) << 10U) | \
((u64)(r5) << 5U) | (u64)(r6))
#define UWM_COLOR_WHITE 0x00FFFFFFU
#define UWM_COLOR_WIN_BLUE 0x000078D7U