ci: disable xwm decorations in weston
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36320>
This commit is contained in:
parent
fa74c31b22
commit
0b82452b19
4 changed files with 175 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ export WESTON_VERSION="14.0.1"
|
|||
git clone https://gitlab.freedesktop.org/wayland/weston
|
||||
cd weston
|
||||
git checkout "$WESTON_VERSION"
|
||||
patch -p1 < "$OLDPWD/.gitlab-ci/container/patches/weston-no-xwm.patch"
|
||||
meson setup \
|
||||
-Dbackend-drm=false \
|
||||
-Dbackend-drm-screencast-vaapi=false \
|
||||
|
|
@ -44,6 +45,7 @@ meson setup \
|
|||
-Dwcap-decode=false \
|
||||
-Dtests=false \
|
||||
-Ddoc=false \
|
||||
-Dno-xwm-decorations=true \
|
||||
_build ${EXTRA_MESON_ARGS:-}
|
||||
meson install -C _build
|
||||
cd ..
|
||||
|
|
|
|||
161
.gitlab-ci/container/patches/weston-no-xwm.patch
Normal file
161
.gitlab-ci/container/patches/weston-no-xwm.patch
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
diff --git a/libweston/meson.build b/libweston/meson.build
|
||||
index d1f126f232a489daa7f96135e353c88129135436..cf7ae7ea05c1479773c31b6786d3cd2a5ffbae02 100644
|
||||
--- a/libweston/meson.build
|
||||
+++ b/libweston/meson.build
|
||||
@@ -101,6 +101,10 @@ if get_option('backend-vnc')
|
||||
deps_libweston += dep_pam
|
||||
endif
|
||||
|
||||
+if get_option('no-xwm-decorations')
|
||||
+ config_h.set('HAVE_NO_XWM_DECORATIONS', '1')
|
||||
+endif
|
||||
+
|
||||
lib_weston = shared_library(
|
||||
'weston-@0@'.format(libweston_major),
|
||||
srcs_libweston,
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 0fbd42a9ff40669391b355ce68e13b84a28e7e4b..f5d8e64cdd9c9a86faf7ae37a9701efb52e553c3 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -214,3 +214,9 @@ option(
|
||||
value: false,
|
||||
description: 'Generate documentation'
|
||||
)
|
||||
+option(
|
||||
+ 'no-xwm-decorations',
|
||||
+ type : 'boolean',
|
||||
+ value : false,
|
||||
+ description : 'Disable xwayland window manager decorations so cairo_xcb is unused.'
|
||||
+)
|
||||
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
|
||||
index d403675227432ceab81cf09ba2191d21570b8ebc..2d196da272ac153c83bdcd0c7e132712d83662c3 100644
|
||||
--- a/xwayland/window-manager.c
|
||||
+++ b/xwayland/window-manager.c
|
||||
@@ -665,6 +665,12 @@ weston_wm_window_get_frame_size(struct weston_wm_window *window,
|
||||
{
|
||||
struct theme *t = window->wm->theme;
|
||||
|
||||
+#ifdef HAVE_NO_XWM_DECORATIONS
|
||||
+ *width = window->width;
|
||||
+ *height = window->height;
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
if (window->fullscreen) {
|
||||
*width = window->width;
|
||||
*height = window->height;
|
||||
@@ -683,6 +689,12 @@ weston_wm_window_get_child_position(struct weston_wm_window *window,
|
||||
{
|
||||
struct theme *t = window->wm->theme;
|
||||
|
||||
+#ifdef HAVE_NO_XWM_DECORATIONS
|
||||
+ *x = 0;
|
||||
+ *y = 0;
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
if (window->fullscreen) {
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
@@ -1096,6 +1108,9 @@ weston_wm_window_set_net_frame_extents(struct weston_wm_window *window)
|
||||
uint32_t property[4];
|
||||
int top = 0, bottom = 0, left = 0, right = 0;
|
||||
|
||||
+ if (!window->frame)
|
||||
+ return;
|
||||
+
|
||||
if (!window->fullscreen)
|
||||
frame_decoration_sizes(window->frame, &top, &bottom, &left, &right);
|
||||
|
||||
@@ -1159,14 +1174,17 @@ weston_wm_window_create_frame(struct weston_wm_window *window)
|
||||
if (window->decorate & MWM_DECOR_MINIMIZE)
|
||||
buttons |= FRAME_BUTTON_MINIMIZE;
|
||||
|
||||
+ window->frame = NULL;
|
||||
+#ifndef HAVE_NO_XWM_DECORATIONS
|
||||
window->frame = frame_create(window->wm->theme,
|
||||
window->width, window->height,
|
||||
buttons, window->name, NULL);
|
||||
|
||||
if (!window->frame)
|
||||
return;
|
||||
-
|
||||
- frame_resize_inside(window->frame, window->width, window->height);
|
||||
+#endif
|
||||
+ if (window->frame)
|
||||
+ frame_resize_inside(window->frame, window->width, window->height);
|
||||
|
||||
weston_wm_window_get_frame_size(window, &width, &height);
|
||||
weston_wm_window_get_child_position(window, &x, &y);
|
||||
@@ -1204,13 +1222,15 @@ weston_wm_window_create_frame(struct weston_wm_window *window)
|
||||
weston_wm_configure_window(wm, window->id,
|
||||
XCB_CONFIG_WINDOW_BORDER_WIDTH, values);
|
||||
|
||||
+ window->cairo_surface = NULL;
|
||||
+#ifndef HAVE_NO_XWM_DECORATIONS
|
||||
window->cairo_surface =
|
||||
cairo_xcb_surface_create_with_xrender_format(wm->conn,
|
||||
wm->screen,
|
||||
window->frame_id,
|
||||
&wm->format_rgba,
|
||||
width, height);
|
||||
-
|
||||
+#endif
|
||||
hash_table_insert(wm->window_hash, window->frame_id, window);
|
||||
weston_wm_window_send_configure_notify(window);
|
||||
}
|
||||
@@ -1369,6 +1389,9 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window)
|
||||
int width, height;
|
||||
const char *how;
|
||||
|
||||
+#ifdef HAVE_NO_XWM_DECORATIONS
|
||||
+ return;
|
||||
+#endif
|
||||
weston_wm_window_get_frame_size(window, &width, &height);
|
||||
|
||||
cairo_xcb_surface_set_size(window->cairo_surface, width, height);
|
||||
@@ -1426,7 +1449,7 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window)
|
||||
window->height + 2);
|
||||
}
|
||||
|
||||
- if (window->decorate && !window->fullscreen) {
|
||||
+ if (window->decorate && !window->fullscreen && window->frame) {
|
||||
frame_input_rect(window->frame, &input_x, &input_y,
|
||||
&input_w, &input_h);
|
||||
} else {
|
||||
@@ -2282,7 +2305,7 @@ weston_wm_handle_button(struct weston_wm *wm, xcb_generic_event_t *event)
|
||||
"PRESS" : "RELEASE", button->detail);
|
||||
|
||||
if (!wm_lookup_window(wm, button->event, &window) ||
|
||||
- !window->decorate)
|
||||
+ !window->decorate || !window->frame)
|
||||
return;
|
||||
|
||||
if (button->detail != 1 && button->detail != 2)
|
||||
@@ -2380,7 +2403,7 @@ weston_wm_handle_motion(struct weston_wm *wm, xcb_generic_event_t *event)
|
||||
int cursor;
|
||||
|
||||
if (!wm_lookup_window(wm, motion->event, &window) ||
|
||||
- !window->decorate)
|
||||
+ !window->decorate || !window->frame)
|
||||
return;
|
||||
|
||||
location = frame_pointer_motion(window->frame, NULL,
|
||||
@@ -2401,7 +2424,7 @@ weston_wm_handle_enter(struct weston_wm *wm, xcb_generic_event_t *event)
|
||||
int cursor;
|
||||
|
||||
if (!wm_lookup_window(wm, enter->event, &window) ||
|
||||
- !window->decorate)
|
||||
+ !window->decorate || !window->frame)
|
||||
return;
|
||||
|
||||
location = frame_pointer_enter(window->frame, NULL,
|
||||
@@ -2420,7 +2443,7 @@ weston_wm_handle_leave(struct weston_wm *wm, xcb_generic_event_t *event)
|
||||
struct weston_wm_window *window;
|
||||
|
||||
if (!wm_lookup_window(wm, leave->event, &window) ||
|
||||
- !window->decorate)
|
||||
+ !window->decorate || !window->frame)
|
||||
return;
|
||||
|
||||
frame_pointer_leave(window->frame, NULL);
|
||||
|
|
@ -19,7 +19,7 @@ include:
|
|||
- .gitlab-ci/conditional-build-image-tags.yml
|
||||
|
||||
variables:
|
||||
DEBIAN_BASE_TAG: "20250722-libwayland"
|
||||
DEBIAN_BASE_TAG: "20250723-decorless"
|
||||
|
||||
DEBIAN_BUILD_TAG: "20250722-libwayland"
|
||||
|
||||
|
|
|
|||
|
|
@ -53,3 +53,14 @@ spec@egl_chromium_sync_control@conformance
|
|||
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test
|
||||
spec@egl_khr_gl_colorspace@linear
|
||||
spec@glsl-1.30@execution@texelfetch fs sampler3d 1x129x9-98x129x9
|
||||
|
||||
# weston with no xwayland decor
|
||||
glx@glx-multithread-buffer
|
||||
spec@!opengl 3.2@gl-3.2-adj-prims line cull-back pv-first
|
||||
spec@arb_gpu_shader_fp64@shader_storage@layout-std140-fp64-mixed-shader
|
||||
spec@arb_shader_storage_buffer_object@layout-std430-write-shader
|
||||
spec@arb_tessellation_shader@execution@tcs-input@tcs-input-ivec3
|
||||
spec@arb_tessellation_shader@execution@tcs-input@tcs-input-mat4x3_2
|
||||
spec@arb_tessellation_shader@execution@tcs-input@tcs-input-uvec3
|
||||
spec@glsl-1.50@execution@primitive-id-no-gs-strip
|
||||
spec@glsl-1.50@execution@vs-input-arrays
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue