Fw: How in the world do I find out the size of a surface in a Wayland client???
Philipp Zabel
p.zabel at pengutronix.de
Wed Jun 12 10:11:12 UTC 2019
Hi,
On Wed, 2019-06-12 at 05:20 +0000, happysmash27 wrote:
> I am trying to make a Wayland program, and my compositor is Sway. To
> make it work well, I want my program to use the output size that Sway
> gives it. The question is... how in the world do I find out what that
> size actually is??? I can't find it anywhere in the documentation!
It depends on the protocol the application speaks to the compositor.
In case of the xdg_wm_base protocol, the xdg_toplevel interface has a
configure event that contains suggested width and height:
https://gitlab.freedesktop.org/wayland/wayland-protocols/blob/master/stable/xdg-shell/xdg-shell.xml#L978
For the zwlr_layer_shell_v1 protocol, the zwlr_layer_surface_v1
interface has a similar event:
https://github.com/swaywm/wlroots/blob/master/protocol/wlr-layer-shell-unstable-v1.xml#L234
regards
Philipp
More information about the wayland-devel
mailing list