1 Star 0 Fork 44

wangyangdahai/xorg-x11-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0022-xwayland-Call-xwl_window_check_resolution_change_emu.patch 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
yangcheng1203 提交于 2021-12-27 15:04 . provide xwayland
From 57d0ad44fd0b04fff98e9b484816dc95068a90cc Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 4 Nov 2019 11:46:49 +0100
Subject: [PATCH xserver 22/24] xwayland: Call
xwl_window_check_resolution_change_emulation() on newly created O-R windows
Some clients, which use vidmode to change the resolution when going fullscreen,
create an override-redirect window and never trigger the screen->ResizeWindow
callback we rely on to do the xwl_window_check_resolution_change_emulation().
This causes us to not apply a viewport to them, causing the fullscreen window
to not fill the entire monitor.
This commit adds a call to xwl_window_check_resolution_change_emulation()
at the end of ensure_surface_for_window() to fix this. Note that
ensure_surface_for_window() exits early without creating an xwl_window
for new windows which will not be backed by a wayland surface and which
thus will not have an xwl_window.
This fixes ClanLib-0.6.x and alleggl-4.4.x using apps not properly
fullscreening.
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 4cfc2677f5c82ca5db0919de549b9b077f1ba113)
---
hw/xwayland/xwayland.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 1294ff1d8..6b86e56bd 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -819,6 +819,11 @@ ensure_surface_for_window(WindowPtr window)
xwl_window_init_allow_commits(xwl_window);
+ if (!window_is_wm_window(window)) {
+ /* CSD or O-R toplevel window, check viewport on creation */
+ xwl_window_check_resolution_change_emulation(xwl_window);
+ }
+
return TRUE;
err_surf:
--
2.25.2
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangyangdahai/xorg-x11-server.git
git@gitee.com:wangyangdahai/xorg-x11-server.git
wangyangdahai
xorg-x11-server
xorg-x11-server
master

搜索帮助