@@ -2342,7 +2342,7 @@ bool glx_round_corners_dst0(session_t *ps, struct managed_win *w, const glx_text
2342
2342
//log_warn("dxy(%d, %d) wh(%d %d) rwh(%d %d) bw(%d)",
2343
2343
// dx, dy, width, height, ps->root_width, ps->root_height, w->g.border_width);
2344
2344
2345
- if (w -> g .border_width >= 1 /*&& w->border_col[0] == -1.0*/ ) {
2345
+ if (w -> g .border_width >= 1 || w -> border_width > 0 ) {
2346
2346
glx_read_border_pixel (w , ps -> root_height , dx , dy , width , height , w -> corner_radius , & w -> border_col [0 ]);
2347
2347
}
2348
2348
@@ -2442,7 +2442,7 @@ bool glx_round_corners_dst0(session_t *ps, struct managed_win *w, const glx_text
2442
2442
if (ppass -> unifm_texsize >= 0 )
2443
2443
glUniform2f (ppass -> unifm_texsize , (float )mwidth , (float )mheight );
2444
2444
if (ppass -> unifm_borderw >= 0 )
2445
- glUniform1f (ppass -> unifm_borderw , (w -> round_borders && w -> border_col [0 ] != -1. ) ? w -> g .border_width : 0 );
2445
+ glUniform1f (ppass -> unifm_borderw , (w -> round_borders && w -> border_col [0 ] != -1. ) ? ( w -> border_width > 0 ? w -> border_width : w -> g .border_width ) : 0 );
2446
2446
if (ppass -> unifm_borderc >= 0 )
2447
2447
glUniform4fv (ppass -> unifm_borderc , 1 , (GLfloat * )& w -> border_col [0 ]);
2448
2448
if (ppass -> unifm_resolution >= 0 )
@@ -2529,7 +2529,7 @@ bool glx_round_corners_dst1(session_t *ps, struct managed_win *w, const glx_text
2529
2529
assert (ps -> psglx -> round_passes [1 ].prog );
2530
2530
bool ret = false;
2531
2531
2532
- if (w -> g .border_width >= 1 /*&& w->border_col[0] == -1.0*/ ) {
2532
+ if (w -> g .border_width >= 1 || w -> border_width > 0 ) {
2533
2533
glx_read_border_pixel (w , ps -> root_height , dx , dy , width , height , w -> corner_radius , & w -> border_col [0 ]);
2534
2534
}
2535
2535
@@ -2561,7 +2561,7 @@ bool glx_round_corners_dst1(session_t *ps, struct managed_win *w, const glx_text
2561
2561
if (ppass -> unifm_texsize >= 0 )
2562
2562
glUniform2f (ppass -> unifm_texsize , (float )width , (float )height );
2563
2563
if (ppass -> unifm_borderw >= 0 )
2564
- glUniform1f (ppass -> unifm_borderw , (w -> round_borders && w -> border_col [0 ] != -1. ) ? w -> g .border_width : 0 );
2564
+ glUniform1f (ppass -> unifm_borderw , (w -> round_borders && w -> border_col [0 ] != -1. ) ? ( w -> border_width > 0 ? w -> border_width : w -> g .border_width ) : 0 );
2565
2565
if (ppass -> unifm_borderc >= 0 )
2566
2566
glUniform4fv (ppass -> unifm_borderc , 1 , (GLfloat * )& w -> border_col [0 ]);
2567
2567
if (ppass -> unifm_resolution >= 0 )
0 commit comments