wl_list_for_each_reverse(surface, &compositor->base.surface_list, link)
weston_surface_draw(surface, &output->base, damage);
+ weston_output_do_read_pixels(&output->base);
+
eglSwapBuffers(compositor->base.display, output->egl_surface);
wl_event_source_timer_update(output->finish_frame_timer, 10);
pixman_image_unref(image);
}
-static void
-x11_output_read_pixels(struct weston_output *output_base, void *data)
-{
- struct x11_output *output = (struct x11_output *) output_base;
- struct x11_compositor *compositor =
- (struct x11_compositor *) output->base.compositor;
-
- eglMakeCurrent(compositor->base.display, output->egl_surface,
- output->egl_surface, compositor->base.context);
-
- glReadPixels(0, 0, output_base->current->width, output_base->current->height,
- GL_BGRA_EXT, GL_UNSIGNED_BYTE, data);
-}
-
static int
x11_compositor_create_output(struct x11_compositor *c, int x, int y,
int width, int height, int fullscreen)
output->finish_frame_timer =
wl_event_loop_add_timer(loop, finish_frame_handler, output);
+ output->base.origin = output->base.current;
output->base.repaint = x11_output_repaint;
output->base.destroy = x11_output_destroy;
output->base.assign_planes = NULL;
- output->base.read_pixels = x11_output_read_pixels;
output->base.set_backlight = NULL;
output->base.set_dpms = NULL;
+ output->base.switch_mode = NULL;
wl_list_insert(c->base.output_list.prev, &output->base.link);
}
output = x11_compositor_find_output(c, focus_in->event);
- notify_keyboard_focus(c->base.input_device,
- weston_compositor_get_time(),
- &c->keys);
+ notify_keyboard_focus(c->base.input_device, &c->keys);
free(prev);
prev = NULL;
break;
output = x11_compositor_find_output(c, enter_notify->event);
notify_pointer_focus(c->base.input_device,
- weston_compositor_get_time(),
&output->base,
output->base.x + enter_notify->event_x,
output->base.y + enter_notify->event_y);
if (enter_notify->state >= Button1Mask)
break;
output = x11_compositor_find_output(c, enter_notify->event);
- notify_pointer_focus(c->base.input_device,
- weston_compositor_get_time(),
- NULL,
+ notify_pointer_focus(c->base.input_device, NULL,
output->base.x + enter_notify->event_x,
output->base.y + enter_notify->event_y);
break;
if (focus_in->mode == XCB_NOTIFY_MODE_WHILE_GRABBED ||
focus_in->mode == XCB_NOTIFY_MODE_UNGRAB)
break;
- notify_keyboard_focus(c->base.input_device,
- weston_compositor_get_time(),
- NULL);
+ notify_keyboard_focus(c->base.input_device, NULL);
break;
default: