Apparently this is something that is not part of Wayland's main protocol, but I'm using Weston, and the xdg-shell extension seems to be necessary:
xdg_surface_set_window_geometry
So, I ran wayland-scanner to create the xdg code and header files:
wayland-scanner code < ./weston-1.6.0/protocol/xdg-shell.xml > xdg_shell.c
wayland-scanner client-header < ./weston-1.6.0/protocol/xdg-shell.xml > xdg_shell.h
The code I use looks something like this:
surface = wl_compositor_create_surface(compositor); if(surface == NULL) { ... } native_window = wl_egl_window_create(surface, some_width, some_height); if(native_window == NULL) { ... } _xdg_surface = xdg_shell_get_xdg_surface(_xdg_shell, surface); xdg_surface_set_window_geometry(_xdg_surface, 0, 0, some_width, some_height);
The code works without errors, but does nothing. I work on Debian Jessie with the Wayland and Weston packages.
If there are other approaches besides xdg_shell that might work, I'm all ears.
wayland
mpr
source share