Check, that only the desktop-shell client spawned by the compositor
(desktop-shell plugin) is allowed to bind to desktop_shell interface.
Other clients will receive an error like:
wl_display@1.error(desktop_shell@20, 0,
"permission to bind desktop_shell denied")
The error has the proper object id and interface type.
Note: desktop-shell cannot be started manually anymore, it has to be
started by the compositor automatically.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Fork and exec desktop-shell in the compositor. This is a way to create
an authenticated client. Later, the desktop-shell interface will be
reserved for this client only.
For exec to work, the compositor should be started from the
wayland-demos' root directory.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
All the compositors are using GLES2 so check for the appropriate
surfaceless extension.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
The repaint logic breaks when finish_frame is called from the present
callback. Ideally we should throttle to vsync (or even better, the
compositor repaint cycle, but hey, X is X), but this goes a long way.
The drm compositor always creates a 64x64 bo for the cursor image
regardless of the size of the actual cursor. When the fade animation
kicks in it disables the hardware cursor so that it is rendered as a
regular surface. This surface is rendered to a 32x32 region but using
a 64x64 texture so the cursor gets scaled down.
Fix this by making create_cursor_image return the actual size of the
image created to the compositor.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
If the current or pending scanout buffer is destroyed, the client frame
will remain being displayed until something else causes a repaint to be
scheduled.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
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>