mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
output: set layout-coords coorectly for cycle box
This commit is contained in:
parent
6ece805e88
commit
83f6618e68
1 changed files with 15 additions and 8 deletions
23
src/output.c
23
src/output.c
|
|
@ -373,14 +373,21 @@ static void
|
||||||
render_cycle_box(struct output *output, pixman_region32_t *output_damage,
|
render_cycle_box(struct output *output, pixman_region32_t *output_damage,
|
||||||
struct view *view)
|
struct view *view)
|
||||||
{
|
{
|
||||||
struct wlr_output_layout *layout = output->server->output_layout;
|
struct wlr_box box = {
|
||||||
double ox = 0, oy = 0;
|
.x = view->x,
|
||||||
struct wlr_box box;
|
.y = view->y,
|
||||||
wlr_output_layout_output_coords(layout, output->wlr_output, &ox, &oy);
|
.width = view->w,
|
||||||
box.x = view->x - view->margin.left + ox;
|
.height = view->h,
|
||||||
box.y = view->y - view->margin.top + oy;
|
};
|
||||||
box.width = view->w + view->margin.left + view->margin.right;
|
if (rc.xdg_shell_server_side_deco) {
|
||||||
box.height = view->h + view->margin.top + view->margin.bottom;
|
box.x -= view->margin.left;
|
||||||
|
box.y -= view->margin.top;
|
||||||
|
box.width += view->margin.left + view->margin.right;
|
||||||
|
box.height += view->margin.top + view->margin.bottom;
|
||||||
|
} else if (!view->maximized) {
|
||||||
|
box.x -= view->padding.left;
|
||||||
|
box.y -= view->padding.top;
|
||||||
|
}
|
||||||
|
|
||||||
float white[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
float white[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
float black[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
float black[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue