Merge pull request #534 from emersion/multi-output-fixes
Fixes for multiple outputs
This commit is contained in:
commit
04b7701e1b
|
@ -74,8 +74,8 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
||||||
wlr_event.time_msec = time;
|
wlr_event.time_msec = time;
|
||||||
wlr_event.width_mm = layout_box.width;
|
wlr_event.width_mm = layout_box.width;
|
||||||
wlr_event.height_mm = layout_box.height;
|
wlr_event.height_mm = layout_box.height;
|
||||||
wlr_event.x_mm = transformed.x + wlr_output->lx + layout_box.x;
|
wlr_event.x_mm = transformed.x + wlr_output->lx - layout_box.x;
|
||||||
wlr_event.y_mm = transformed.y + wlr_output->ly + layout_box.y;
|
wlr_event.y_mm = transformed.y + wlr_output->ly - layout_box.y;
|
||||||
wl_signal_emit(&dev->pointer->events.motion_absolute, &wlr_event);
|
wl_signal_emit(&dev->pointer->events.motion_absolute, &wlr_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,16 +220,10 @@ static void write_image(const char *filename, int width, int height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_buffer_size(int *width, int *height) {
|
static int set_buffer_size(int *width, int *height) {
|
||||||
struct screenshooter_output *output;
|
|
||||||
min_x = min_y = INT_MAX;
|
min_x = min_y = INT_MAX;
|
||||||
max_x = max_y = INT_MIN;
|
max_x = max_y = INT_MIN;
|
||||||
int position = 0;
|
|
||||||
|
|
||||||
wl_list_for_each_reverse(output, &output_list, link) {
|
|
||||||
output->offset_x = position;
|
|
||||||
position += output->width;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
struct screenshooter_output *output;
|
||||||
wl_list_for_each(output, &output_list, link) {
|
wl_list_for_each(output, &output_list, link) {
|
||||||
min_x = MIN(min_x, output->offset_x);
|
min_x = MIN(min_x, output->offset_x);
|
||||||
min_y = MIN(min_y, output->offset_y);
|
min_y = MIN(min_y, output->offset_y);
|
||||||
|
|
Loading…
Reference in New Issue