@ -866,6 +866,7 @@ win_match(win *w, wincond *condlst, wincond **cache) {
// Then go through the whole linked list
// Then go through the whole linked list
for ( ; condlst ; condlst = condlst - > next ) {
for ( ; condlst ; condlst = condlst - > next ) {
if ( win_match_once ( w , condlst ) ) {
if ( win_match_once ( w , condlst ) ) {
if ( cache )
* cache = condlst ;
* cache = condlst ;
return true ;
return true ;
}
}
@ -1583,38 +1584,38 @@ win_paint_win(Display *dpy, win *w, Picture tgt_buffer) {
XRenderComposite ( dpy , PictOpOver , w - > picture , w - > frame_alpha_pict , \
XRenderComposite ( dpy , PictOpOver , w - > picture , w - > frame_alpha_pict , \
tgt_buffer , ( cx ) , ( cy ) , 0 , 0 , x + ( cx ) , y + ( cy ) , ( cwid ) , ( chei ) )
tgt_buffer , ( cx ) , ( cy ) , 0 , 0 , x + ( cx ) , y + ( cy ) , ( cwid ) , ( chei ) )
// The following complicated logic is requ r ied because some broken
// The following complicated logic is requ ir ed because some broken
// window managers (I'm talking about you, Openbox!) that makes
// window managers (I'm talking about you, Openbox!) that makes
// top_width + bottom_width > height in some cases.
// top_width + bottom_width > height in some cases.
// top
// top
COMP_BDR ( 0 , 0 , wid , min_i ( t , hei ) ) ;
int phei = min_i ( t , hei ) ;
if ( phei > 0 )
COMP_BDR ( 0 , 0 , wid , phei ) ;
if ( hei > t ) {
if ( hei > t ) {
int phei = min_i ( hei - t , b ) ;
phei = min_i ( hei - t , b ) ;
// bottom
// bottom
if ( phei ) {
if ( phei > 0 )
assert ( phei > 0 ) ;
COMP_BDR ( 0 , hei - phei , wid , phei ) ;
COMP_BDR ( 0 , hei - phei , wid , phei ) ;
phei = hei - t - phei ;
phei = hei - t - phei ;
if ( phei ) {
if ( phei > 0 ) {
assert ( phei > 0 ) ;
int pwid = min_i ( l , wid ) ;
// left
// left
COMP_BDR ( 0 , t , min_i ( l , wid ) , phei ) ;
if ( pwid > 0 )
COMP_BDR ( 0 , t , pwid , phei ) ;
if ( wid > l ) {
if ( wid > l ) {
int pwid = min_i ( wid - l , r ) ;
pwid = min_i ( wid - l , r ) ;
if ( pwid ) {
assert ( pwid > 0 ) ;
// right
// right
if ( pwid > 0 )
COMP_BDR ( wid - pwid , t , pwid , phei ) ;
COMP_BDR ( wid - pwid , t , pwid , phei ) ;
pwid = wid - l - pwid ;
pwid = wid - l - pwid ;
if ( pwid )
if ( pwid > 0 ) {
assert ( pwid > 0 ) ;
// body
// body
XRenderComposite ( dpy , op , w - > picture , alpha_mask ,
XRenderComposite ( dpy , op , w - > picture , alpha_mask ,
tgt_buffer , l , t , 0 , 0 , x + l , y + t , pwid , phei ) ;
tgt_buffer , l , t , 0 , 0 , x + l , y + t , pwid , phei ) ;
@ -1623,7 +1624,6 @@ win_paint_win(Display *dpy, win *w, Picture tgt_buffer) {
}
}
}
}
}
}
}
# undef COMP_BDR
# undef COMP_BDR