xdg_toplevel; struct wl_egl_window *egl_window; }; static void xdg_wm_base_ping(void *data, struct xdg_wm_base *shell, uint32_t serial) { xdg_wm_base_pong(shell, serial); } /*for xdg_wm_base listener*/ static const struct xdg_wm_base_listener...
surface刚被创建时,它处于无效状态。你需要提供必要的信息令其有效,包括给它角色(比如交给xdg_wm_base让它变成xdg_toplevel), 申请并绑定一个buffer, 设置角色相关的信息(比如标题), 当你调用wl_surface.commit请求时,surface会变成有效状态并被服务端渲染到图形输出设备。 当调用wl_surface.commit时,下列内容会被...
1.我们先用xdg_wm_base_get_xdg_surface();和xdg_surface_get_toplevel();两个函数,将窗口的两个基本属性所对应的指针获取2.然后用xdg_surface_add_listener();xdg_toplevel_add_listener();给对应的指针绑定到对应的侦听器,这样我们就可以监测窗口属性的变化。 不过,别急,和之前的 wl_registry_add_listener...
wl_subsurface_set_position(g_context.xdg_sub, 0, 0); wl_subsurface_place_above(g_context.xdg_sub, g_context.surface); wl_subsurface_set_sync(g_context.xdg_sub); 在需要时创建一个大像素池,内含2个buffer: static int create_buffer(int width, int height) { int stride = width * 4; int...
xdg-shell,作为扩展协议,并未定义在wayland.xml中。然而,你可以在wayland-protocols包中找到。它可能安装在你系统中类似/usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml的路径中。xdg_wm_basexdg_wm_base是唯一的规范定义的全局变量,它提供了创建你所需要的每一个其它对象的请求。最基础的实现就是从...
wm_base: Option<xdg_wm_base::XdgWmBase>, windows: Vec<(xdg_surface::XdgSurface, Arc<WaylandWindowState>)>, platform_inner: Arc<LinuxPlatformInner>, } pub(crate) struct WaylandClient { platform_inner: Arc<LinuxPlatformInner>, conn: Arc<Connection>, state: Mutex<WaylandClientState>, event_...
wm_base : [`V1] Xdg_wm_base.t; decor_mgr : [`V1] Xdg_decor_mgr.t option; unpaired : (int32, unpaired) Hashtbl.t; (* Client-side Wayland ID -> details *) unpaired_added : Eio.Condition.t; (* Fires when [unpaired] gets a new entry. *) ...
> > "xdg_wm_base"). > > b. Protocols in a namespace may optionally use the namespace followed by a > > dash > > in the name (e.g. "xdg-shell"). > > The usage of a dash instead of underscore is what the name as well as ...
xdg_wm_baseenabled zxdg_shell_v6enabled zwlr_layer_shell_v1disabled zxdg_output_manager_v1disabled The simplest way to configure these extensions is to take an existing Mir shell and specify the extensions you want: miral-shell --wayland-extensions wl_shell:zxdg_shell_v6:zxdg_output_manager...
"xdg_wm_base"). b. Protocols in a namespace may optionally use the namespace followed by a dash in the name (e.g. "xdg-shell"). c. The "xdg" namespace is established for protocols useful for implementing desktop-like systems. ...