@ -211,9 +211,9 @@ static void render_view_toplevels(struct sway_view *view,
. alpha = alpha ,
. alpha = alpha ,
} ;
} ;
// Render all toplevels without descending into popups
// Render all toplevels without descending into popups
double ox = view - > container - > current . view _x -
double ox = view - > container - > current . content _x -
output - > wlr_output - > lx - view - > geometry . x ;
output - > wlr_output - > lx - view - > geometry . x ;
double oy = view - > container - > current . view _y -
double oy = view - > container - > current . content _y -
output - > wlr_output - > ly - view - > geometry . y ;
output - > wlr_output - > ly - view - > geometry . y ;
output_surface_for_each_surface ( output , view - > surface , ox , oy ,
output_surface_for_each_surface ( output , view - > surface , ox , oy ,
render_surface_iterator , & data ) ;
render_surface_iterator , & data ) ;
@ -247,9 +247,9 @@ static void render_saved_view(struct sway_view *view,
return ;
return ;
}
}
struct wlr_box box = {
struct wlr_box box = {
. x = view - > container - > current . view _x - output - > wlr_output - > lx -
. x = view - > container - > current . content _x - output - > wlr_output - > lx -
view - > saved_geometry . x ,
view - > saved_geometry . x ,
. y = view - > container - > current . view _y - output - > wlr_output - > ly -
. y = view - > container - > current . content _y - output - > wlr_output - > ly -
view - > saved_geometry . y ,
view - > saved_geometry . y ,
. width = view - > saved_buffer_width ,
. width = view - > saved_buffer_width ,
. height = view - > saved_buffer_height ,
. height = view - > saved_buffer_height ,
@ -300,10 +300,10 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
if ( state - > border_left ) {
if ( state - > border_left ) {
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
premultiply_alpha ( color , con - > alpha ) ;
premultiply_alpha ( color , con - > alpha ) ;
box . x = state - > con_ x;
box . x = state - > x;
box . y = state - > view _y;
box . y = state - > content _y;
box . width = state - > border_thickness ;
box . width = state - > border_thickness ;
box . height = state - > view _height;
box . height = state - > content _height;
scale_box ( & box , output_scale ) ;
scale_box ( & box , output_scale ) ;
render_rect ( output - > wlr_output , damage , & box , color ) ;
render_rect ( output - > wlr_output , damage , & box , color ) ;
}
}
@ -319,10 +319,10 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
}
}
premultiply_alpha ( color , con - > alpha ) ;
premultiply_alpha ( color , con - > alpha ) ;
box . x = state - > view_x + state - > view _width;
box . x = state - > content_x + state - > content _width;
box . y = state - > view _y;
box . y = state - > content _y;
box . width = state - > border_thickness ;
box . width = state - > border_thickness ;
box . height = state - > view _height;
box . height = state - > content _height;
scale_box ( & box , output_scale ) ;
scale_box ( & box , output_scale ) ;
render_rect ( output - > wlr_output , damage , & box , color ) ;
render_rect ( output - > wlr_output , damage , & box , color ) ;
}
}
@ -334,9 +334,9 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
}
}
premultiply_alpha ( color , con - > alpha ) ;
premultiply_alpha ( color , con - > alpha ) ;
box . x = state - > con_ x;
box . x = state - > x;
box . y = state - > view_y + state - > view _height;
box . y = state - > content_y + state - > content _height;
box . width = state - > con_ width;
box . width = state - > width;
box . height = state - > border_thickness ;
box . height = state - > border_thickness ;
scale_box ( & box , output_scale ) ;
scale_box ( & box , output_scale ) ;
render_rect ( output - > wlr_output , damage , & box , color ) ;
render_rect ( output - > wlr_output , damage , & box , color ) ;
@ -585,9 +585,9 @@ static void render_top_border(struct sway_output *output,
// Child border - top edge
// Child border - top edge
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
memcpy ( & color , colors - > child_border , sizeof ( float ) * 4 ) ;
premultiply_alpha ( color , con - > alpha ) ;
premultiply_alpha ( color , con - > alpha ) ;
box . x = state - > con_ x;
box . x = state - > x;
box . y = state - > con_ y;
box . y = state - > y;
box . width = state - > con_ width;
box . width = state - > width;
box . height = state - > border_thickness ;
box . height = state - > border_thickness ;
scale_box ( & box , output_scale ) ;
scale_box ( & box , output_scale ) ;
render_rect ( output - > wlr_output , output_damage , & box , color ) ;
render_rect ( output - > wlr_output , output_damage , & box , color ) ;
@ -641,8 +641,8 @@ static void render_containers_linear(struct sway_output *output,
}
}
if ( state - > border = = B_NORMAL ) {
if ( state - > border = = B_NORMAL ) {
render_titlebar ( output , damage , child , state - > con_ x,
render_titlebar ( output , damage , child , state - > x,
state - > con_ y, state - > con_ width, colors ,
state - > y, state - > width, colors ,
title_texture , marks_texture ) ;
title_texture , marks_texture ) ;
} else if ( state - > border = = B_PIXEL ) {
} else if ( state - > border = = B_PIXEL ) {
render_top_border ( output , damage , child , colors ) ;
render_top_border ( output , damage , child , colors ) ;
@ -696,7 +696,7 @@ static void render_containers_tabbed(struct sway_output *output,
marks_texture = child - > marks_unfocused ;
marks_texture = child - > marks_unfocused ;
}
}
int x = cstate - > con_ x + tab_width * i ;
int x = cstate - > x + tab_width * i ;
// Make last tab use the remaining width of the parent
// Make last tab use the remaining width of the parent
if ( i = = parent - > children - > length - 1 ) {
if ( i = = parent - > children - > length - 1 ) {
@ -801,10 +801,10 @@ static void render_container(struct sway_output *output,
struct parent_data data = {
struct parent_data data = {
. layout = con - > current . layout ,
. layout = con - > current . layout ,
. box = {
. box = {
. x = con - > current . con_ x,
. x = con - > current . x,
. y = con - > current . con_ y,
. y = con - > current . y,
. width = con - > current . con_ width,
. width = con - > current . width,
. height = con - > current . con_ height,
. height = con - > current . height,
} ,
} ,
. children = con - > current . children ,
. children = con - > current . children ,
. focused = focused ,
. focused = focused ,
@ -853,8 +853,8 @@ static void render_floating_container(struct sway_output *soutput,
}
}
if ( con - > current . border = = B_NORMAL ) {
if ( con - > current . border = = B_NORMAL ) {
render_titlebar ( soutput , damage , con , con - > current . con_ x,
render_titlebar ( soutput , damage , con , con - > current . x,
con - > current . con_ y, con - > current . con_ width, colors ,
con - > current . y, con - > current . width, colors ,
title_texture , marks_texture ) ;
title_texture , marks_texture ) ;
} else if ( con - > current . border = = B_PIXEL ) {
} else if ( con - > current . border = = B_PIXEL ) {
render_top_border ( soutput , damage , con , colors ) ;
render_top_border ( soutput , damage , con , colors ) ;