The shell module only needs to deal with attach when it's either the initial
attach or when the attach changes the size of the surface. In case of
initial attach, the shell needs to pick a position for the surface and a
place in the surface stack. We split this case out as a new shell->map
callback. The other case is split into the shell->configure callback,
where the shell may adjust the surface position or reject the new size.
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>
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>
The shell module is responsible for implementing the higher level
compositor behavior. We default to the desktop-lite shell built in to
the compositor.
For now, we just use glScissor and clip to the extent of the damage region,
but we can do even better by clipping the repaint to the region rectangles.