Without this fix, the dnd demo would make the demo compositor crash in
shell.c:drag_offer() because resource->data is NULL.
Initialise resource->data in shell_create_drag().
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
wlsc_output_repaint may call wlsc_surface_damage indirectly through
wlsc_output_set_cursor. If this happens in the call made from repaint,
one ends up with repaint being called from both idle_repaint and
wlsc_output_finish_frame.
Fix this by setting output->repaint_scheduled to 1 before calling
wlsc_output_repaint in the function repaint.
[krh] Edited to just only clear repaint_scheduled, when we no longer have
a repaint scheduled.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
On repaint, wlsc_output_repaint will replace output->scanout_buffer with
the new front buffer and then output->present() will cause this buffer
to be displayed. When wlsc_output_finish_frame is called, the
compositor will send a release buffer event for output->scanout_buffer
which is actually the front buffer now.
This patch changes this code to release the previous scanout_buffer
instead of the front buffer on wlsc_output_finish_frame.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Move this to a separate function to better accommodate changes in the
following commit.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
The files in question are copyright Benjamin Franzke (who agrees),
Intel Corporation, Red Hat and myself. On behalf of Red Hat,
Richard Fontana says:
"Therefore, to the extent that Red Hat, Inc. has any copyright
interest in the files you cited as of this date (compositor-drm.c,
compositor.c, compositor.h, screenshooter.c in
http://cgit.freedesktop.org/wayland/wayland-demos/tree/compositor),
Red Hat hereby elects to apply the CC0 1.0 Universal Public Domain
Dedication to such copyrighted material. See:
http://creativecommons.org/publicdomain/zero/1.0/legalcode .
Thanks,
Richard E. Fontana
Open Source Licensing and Patent Counsel
Red Hat, Inc."
At initialization, if it fails in binding the socket or creating the
lock file then the pointer will be already freed and will result a
segfault when quiting the compositor.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>