mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Revert "Multiple output coords by scale"
This reverts commit 94f8bdf081
.
This commit is contained in:
parent
94f8bdf081
commit
265378270a
|
@ -37,7 +37,7 @@ static void rotate_child_position(double *sx, double *sy, double sw, double sh,
|
||||||
|
|
||||||
static void render_surface(struct wlr_surface *surface,
|
static void render_surface(struct wlr_surface *surface,
|
||||||
struct wlr_output *wlr_output, struct timespec *when,
|
struct wlr_output *wlr_output, struct timespec *when,
|
||||||
double ox, double oy, float rotation) {
|
double lx, double ly, float rotation) {
|
||||||
if (!wlr_surface_has_buffer(surface)) {
|
if (!wlr_surface_has_buffer(surface)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -46,16 +46,17 @@ static void render_surface(struct wlr_surface *surface,
|
||||||
int height = surface->current->height;
|
int height = surface->current->height;
|
||||||
int render_width = width * wlr_output->scale;
|
int render_width = width * wlr_output->scale;
|
||||||
int render_height = height * wlr_output->scale;
|
int render_height = height * wlr_output->scale;
|
||||||
ox *= wlr_output->scale;
|
int owidth, oheight;
|
||||||
oy *= wlr_output->scale;
|
wlr_output_effective_resolution(wlr_output, &owidth, &oheight);
|
||||||
|
|
||||||
|
// FIXME: view coords are inconsistently assumed to be in output or layout coords
|
||||||
struct wlr_box layout_box = {
|
struct wlr_box layout_box = {
|
||||||
.x = ox + wlr_output->lx, .y = oy + wlr_output->ly,
|
.x = lx + wlr_output->lx, .y = ly + wlr_output->ly,
|
||||||
.width = render_width, .height = render_height,
|
.width = render_width, .height = render_height,
|
||||||
};
|
};
|
||||||
if (wlr_output_layout_intersects(layout, wlr_output, &layout_box)) {
|
if (wlr_output_layout_intersects(layout, wlr_output, &layout_box)) {
|
||||||
struct wlr_box render_box = {
|
struct wlr_box render_box = {
|
||||||
.x = ox, .y = oy,
|
.x = lx, .y = ly,
|
||||||
.width = render_width, .height = render_height
|
.width = render_width, .height = render_height
|
||||||
};
|
};
|
||||||
float matrix[16];
|
float matrix[16];
|
||||||
|
@ -77,8 +78,8 @@ static void render_surface(struct wlr_surface *surface,
|
||||||
rotate_child_position(&sx, &sy, sw, sh, width, height, rotation);
|
rotate_child_position(&sx, &sy, sw, sh, width, height, rotation);
|
||||||
|
|
||||||
render_surface(subsurface->surface, wlr_output, when,
|
render_surface(subsurface->surface, wlr_output, when,
|
||||||
ox + sx,
|
lx + sx,
|
||||||
oy + sy,
|
ly + sy,
|
||||||
rotation);
|
rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue