0 Star 0 Fork 42

t.feng/xorg-x11-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0012-xwayland-xwl_window_should_enable_viewport-Add-extra.patch 1.91 KB
一键复制 编辑 原始数据 按行查看 历史
t.feng 提交于 2020-03-16 22:51 . patch init
From 912688326c0f9435660e86a2bdab049caa4b0e9f Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 26 Aug 2019 12:26:34 +0200
Subject: [PATCH xserver 12/14] xwayland: xwl_window_should_enable_viewport:
Add extra test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Games based on the allegro gaming library or on ClanLib-1.0 do not size
their window to match the fullscreen resolution, instead they use a
window covering the entire screen, drawing only the fullscreen resolution
part of it.
This commit adds a check for these games, so that we correctly apply a
viewport to them making fullscreen work properly for these games under
Xwayland.
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
hw/xwayland/xwayland.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index ec1b7eee4..58252d2e8 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -636,6 +636,23 @@ xwl_window_should_enable_viewport(struct xwl_window *xwl_window,
}
}
+ /* 2. Test if the window uses override-redirect + vidmode
+ * and matches (fully covers) the entire screen.
+ * This path gets hit by: allegro4, ClanLib-1.0.
+ */
+ xwl_output = xwl_screen_get_first_output(xwl_screen);
+ emulated_mode = xwl_output_get_emulated_mode_for_client(xwl_output, owner);
+ if (xwl_output && xwl_window->window->overrideRedirect &&
+ emulated_mode && emulated_mode->from_vidmode &&
+ xwl_window->x == 0 && xwl_window->y == 0 &&
+ xwl_window->width == xwl_screen->width &&
+ xwl_window->height == xwl_screen->height) {
+
+ *emulated_mode_ret = emulated_mode;
+ *xwl_output_ret = xwl_output;
+ return TRUE;
+ }
+
return FALSE;
}
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/t_feng/xorg-x11-server.git
git@gitee.com:t_feng/xorg-x11-server.git
t_feng
xorg-x11-server
xorg-x11-server
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385