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


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:


For the zwlr_layer_shell_v1 protocol, the zwlr_layer_surface_v1
interface has a similar event:



More information about the wayland-devel mailing list