Method and device for realizing x window scaling under wayland environment, electronic equipment and storage medium

CN120704577BActive Publication Date: 2026-08-28KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510962001.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2026-08-28
Estimated Expiration
2045-07-14

AI Technical Summary

Technical Problem

[0005]本发明提供一种Wayland环境下X窗口缩放的实现方法、装置、电子设备及存储介质,使用XWayland rootless模式,用以解决XWayland在高分辨率及分数缩放场景下显示模糊、缩放失真以及交互偏移的问题

Benefits of technology

[0034]本发明提供的一种Wayland环境下X窗口缩放的实现方法、装置、电子设备及存储介质,使用XWayland rootless模式,该方法通过在多个显示器中统计缩放因子并选取最大值作为处理XWayland窗口的全局缩放因子max_scale,Wayland合成器能够同步更新发送给XWayland使用的xdg_output大小以及XWayland所使用的xft.dpi,从而使X11应用依据正确的DPI值重新绘制图形内容并生成高分辨率的buffer,有效提升窗口显示的清晰度。同时,Wayland合成器在接收XWayland传输的surface几何信息时,通过xwayland_unscale函数进行反向缩放,将物理坐标准确转换为逻辑坐标,在向XWayland返回surface信息时,再通过xwayland_scale函数将逻辑坐标转换回物理坐标,确保逻辑坐标系与物理坐标系的一致性和交互准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704577B_ABST
    Figure CN120704577B_ABST
Patent Text Reader

Abstract

The application provides an implementation method, device and equipment of X window scaling under a Wayland environment and a storage medium, the method comprising: selecting max_scale, updating and sending relevant information of max_scale to XWayland; then adjusting the screen size and geometric coordinates of a virtual device, saving and notifying X11 of updated xft.dpi; X11 draws a buffer according to the scaled screen size and the updated xft.dpi, converts wl_surface and wl_buffer based on the buffer; after the Wayland compositor receives the surface, reverse scaling is performed; when the surface is returned, the surface is sent after scaling conversion according to max_scale. In this way, the method can solve the problem of display blur of XWayland in a high-resolution scene.
Need to check novelty before this filing date? Find Prior Art

Citation Information

Patent Citations

  • Method and device for zooming Android application window on Linux

    CN116627579A

  • Remote desktop resolution optimization method and system in wayland environment

    CN120216086A