@@ -688,6 +688,9 @@ static void maprequest(XEvent *e);
688688static void motionnotify (XEvent * e );
689689static void movemouse (const Arg * arg );
690690static Client * nexttiled (Client * c );
691+ #if NOBORDER_PATCH
692+ static int noborder (Client * c );
693+ #endif // NOBORDER_PATCH
691694#if !ZOOMSWAP_PATCH || TAGINTOSTACK_ALLMASTER_PATCH || TAGINTOSTACK_ONEMASTER_PATCH
692695static void pop (Client * c );
693696#endif // !ZOOMSWAP_PATCH / TAGINTOSTACK_ALLMASTER_PATCH / TAGINTOSTACK_ONEMASTER_PATCH
@@ -1466,6 +1469,15 @@ configure(Client *c)
14661469 ce .width = c -> w ;
14671470 ce .height = c -> h ;
14681471 ce .border_width = c -> bw ;
1472+
1473+ #if NOBORDER_PATCH
1474+ if (noborder (c )) {
1475+ ce .width += c -> bw * 2 ;
1476+ ce .height += c -> bw * 2 ;
1477+ ce .border_width = 0 ;
1478+ }
1479+ #endif // NOBORDER_PATCH
1480+
14691481 ce .above = None ;
14701482 ce .override_redirect = False ;
14711483 XSendEvent (dpy , c -> win , False , StructureNotifyMask , (XEvent * )& ce );
@@ -2862,6 +2874,52 @@ nexttiled(Client *c)
28622874 return c ;
28632875}
28642876
2877+ #if NOBORDER_PATCH
2878+ int
2879+ noborder (Client * c )
2880+ {
2881+ int monocle_layout = 0 ;
2882+
2883+ #if MONOCLE_LAYOUT
2884+ if (& monocle == c -> mon -> lt [c -> mon -> sellt ]-> arrange )
2885+ monocle_layout = 1 ;
2886+ #endif // MONOCLE_LAYOUT
2887+
2888+ #if DECK_LAYOUT
2889+ if (& deck == c -> mon -> lt [c -> mon -> sellt ]-> arrange && c -> mon -> nmaster == 0 )
2890+ monocle_layout = 1 ;
2891+ #endif // DECK_LAYOUT
2892+
2893+ #if FLEXTILE_DELUXE_LAYOUT
2894+ if (& flextile == c -> mon -> lt [c -> mon -> sellt ]-> arrange && (
2895+ (c -> mon -> ltaxis [LAYOUT ] == NO_SPLIT && c -> mon -> ltaxis [MASTER ] == MONOCLE ) ||
2896+ (c -> mon -> ltaxis [STACK ] == MONOCLE && c -> mon -> nmaster == 0 )
2897+ )) {
2898+ monocle_layout = 1 ;
2899+ }
2900+ #endif //FLEXTILE_DELUXE_LAYOUT
2901+
2902+ if (!monocle_layout && (nexttiled (c -> mon -> clients ) != c || nexttiled (c -> next )))
2903+ return 0 ;
2904+
2905+ if (c -> isfloating )
2906+ return 0 ;
2907+
2908+ if (!c -> mon -> lt [c -> mon -> sellt ]-> arrange )
2909+ return 0 ;
2910+
2911+ #if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
2912+ if (c -> fakefullscreen != 1 && c -> isfullscreen )
2913+ return 0 ;
2914+ #elif !FAKEFULLSCREEN_PATCH
2915+ if (c -> isfullscreen )
2916+ return 0 ;
2917+ #endif // FAKEFULLSCREEN_CLIENT_PATCH
2918+
2919+ return 1 ;
2920+ }
2921+ #endif // NOBORDER_PATCH
2922+
28652923#if !ZOOMSWAP_PATCH || TAGINTOSTACK_ALLMASTER_PATCH || TAGINTOSTACK_ONEMASTER_PATCH
28662924void
28672925pop (Client * c )
@@ -3016,31 +3074,9 @@ resizeclient(Client *c, int x, int y, int w, int h)
30163074 drawroundedcorners (c );
30173075 #endif // ROUNDED_CORNERS_PATCH
30183076 #if NOBORDER_PATCH
3019- if (((nexttiled (c -> mon -> clients ) == c && !nexttiled (c -> next ))
3020- #if MONOCLE_LAYOUT
3021- || & monocle == c -> mon -> lt [c -> mon -> sellt ]-> arrange
3022- #endif // MONOCLE_LAYOUT
3023- #if DECK_LAYOUT
3024- || (& deck == c -> mon -> lt [c -> mon -> sellt ]-> arrange &&
3025- c -> mon -> nmaster == 0 )
3026- #endif // DECK_LAYOUT
3027- #if FLEXTILE_DELUXE_LAYOUT
3028- || (& flextile == c -> mon -> lt [c -> mon -> sellt ]-> arrange && (
3029- (c -> mon -> ltaxis [LAYOUT ] == NO_SPLIT &&
3030- c -> mon -> ltaxis [MASTER ] == MONOCLE ) ||
3031- (c -> mon -> ltaxis [STACK ] == MONOCLE &&
3032- c -> mon -> nmaster == 0 )))
3033- #endif //FLEXTILE_DELUXE_LAYOUT
3034- )
3035- #if FAKEFULLSCREEN_CLIENT_PATCH && !FAKEFULLSCREEN_PATCH
3036- && (c -> fakefullscreen == 1 || !c -> isfullscreen )
3037- #else
3038- && !c -> isfullscreen
3039- #endif // FAKEFULLSCREEN_CLIENT_PATCH
3040- && !c -> isfloating
3041- && c -> mon -> lt [c -> mon -> sellt ]-> arrange ) {
3042- c -> w = wc .width += c -> bw * 2 ;
3043- c -> h = wc .height += c -> bw * 2 ;
3077+ if (noborder (c )) {
3078+ wc .width += c -> bw * 2 ;
3079+ wc .height += c -> bw * 2 ;
30443080 wc .border_width = 0 ;
30453081 }
30463082 #endif // NOBORDER_PATCH
0 commit comments