Wayland xdg-shell protocol

From Tizen Wiki
Jump to: navigation, search

The purpose of this page is to document and give implementations examples of the XDG-Shell protocol, which is an extended way to manage surfaces under Wayland compositors (including Weston).


The traditional way to maximize, fullscreen... surfaces is to use the wl_shell_*() functions, which live in the core Wayland protocol ("wayland-client.h" / libwayland-client package).

xdg-shell, on the contrary, is supposed to be provided by the compositor. So you will find the "xdg-shell-client-protocol.h" header in the Weston source tree. Other compositors are supposed to provide their own implementation.

For the moment, as the protocol is not versioned, toolkits and applications tend to include the header in their own source tree.


The protocol is still evolving, but here are a few features not found in wl_shell :

  • minimization (xdg_surface_set_minimized()) ;
  • forcing a particular output/screen, for fullscreen surfaces only (xdg_surface_set_output()) ;
  • (WIP) showing a minimized surface again (xdg_surface_present()).

Implementation examples

In the past, we used to create a wl_shell_surface on top of a wl_surface :

struct wl_shell_surface *shell_surface;
shell_surface = wl_shell_get_shell_surface (wl_shell, wl_surface);

We will now create a xdg_surface instead :

struct xdg_surface *xdg_surface;
xdg_surface = xdg_shell_get_xdg_surface (xdg_shell, wl_surface);

And then be able to run some requests on it. Here minimization :

xdg_surface_set_minimized (xdg_surface);


There is an IVI-centered, candidate for upstream integration, alternative named IVI-Shell.

It has more functionality but targets specific embedded systems.

Tizen integration

Status :

EFL : in tizen branch

Upstream is supporting version 5 (and later?)

Qt: upstream

Merged back to tizen branch until tizen rebase on next release that will ship it (Qt-5.4?)

Ask User:Pcoval for support

ozone-wayland : upstream

It's built but not enabled by default :

To be used into CrossWalk  :

Bugs and reviews pending :