Fix rounded corners

they were being dumb
This commit is contained in:
2026-07-02 23:00:13 -04:00
parent 8478762828
commit d3999a9d3c
6 changed files with 115 additions and 99 deletions
+4 -10
View File
@@ -655,8 +655,7 @@ static void
parse_effects(lua_State *L, CfgEffects *e)
{
/* Defaults */
e->windows.rounded = false;
strcpy(e->windows.rounding, "off");
e->windows.corner_radius = 0;
lua_getglobal(L, "effects");
if (!lua_istable(L, -1)) {
@@ -670,14 +669,9 @@ parse_effects(lua_State *L, CfgEffects *e)
return;
}
e->windows.rounded = lua_get_bool(L, "rounded", false);
char scratch[CFG_MAX_STRLEN] = {0};
lua_get_string(L, "rounding", scratch, sizeof(scratch));
if (!strcmp(scratch, "light") || !strcmp(scratch, "heavy"))
strncpy(e->windows.rounding, scratch, CFG_MAX_STRLEN - 1);
else
strcpy(e->windows.rounding, "off");
e->windows.corner_radius = lua_get_int(L, "corner_radius", 0);
if (e->windows.corner_radius < 0)
e->windows.corner_radius = 0;
parse_shadows(L, &e->windows.shadows);
+1 -2
View File
@@ -122,8 +122,7 @@ typedef struct {
} CfgEffectsWindowShadows;
typedef struct {
bool rounded;
char rounding[CFG_MAX_STRLEN];
int corner_radius; /* 0 = off, >0 = radius in pixels */
CfgEffectsWindowShadows shadows;
} CfgEffectsWindows;