Rethink HiDPI output layouts, fixes everything

Except for subsurfaces not rendering at the right scale. But that part
is (somewhat) easy.
This commit is contained in:
Drew DeVault 2017-11-02 23:17:39 -04:00
parent ed74f473d6
commit ca8cf7d48d
3 changed files with 10 additions and 6 deletions

View file

@ -167,15 +167,14 @@ struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly,
continue;
}
int scale = view->wlr_surface->current->scale;
double view_sx = (lx - view->x) / (double)scale;
double view_sy = (ly - view->y) / (double)scale;
double view_sx = lx - view->x;
double view_sy = ly - view->y;
struct wlr_box box = {
.x = 0,
.y = 0,
.width = view->wlr_surface->current->buffer_width * scale,
.height = view->wlr_surface->current->buffer_height * scale,
.width = view->wlr_surface->current->buffer_width,
.height = view->wlr_surface->current->buffer_height,
};
if (view->rotation != 0.0) {
// Coordinates relative to the center of the view