[PATCH weston] compositor-x11: fix default output scale
ppaalanen at gmail.com
ppaalanen at gmail.com
Thu May 23 03:31:39 PDT 2013
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Default output scale of 256 makes little sense. Actually this is a type
mismatch between wl_fixed and int, probably a leftover from when the
scale factor was proposed as a fixed point number.
Scale 256 probably causes the Window creation to fail, but that actually
leads to a segfault in Mesa libEGL later:
Program received signal SIGSEGV, Segmentation fault.
0 dri2_create_window_surface (drv=0x645060, disp=0x646610, conf=<optimized out>, window=<optimized out>, attrib_list=<optimized out>)
at platform_x11.c:291
291 surf->SwapInterval = 1;
Here 'surf' is NULL.
1 0x00007ffff76c0709 in eglCreateWindowSurface (dpy=0x646610, config=<optimized out>, window=58720261, attrib_list=0x0) at eglapi.c:534
2 0x0000000000421549 in gl_renderer_output_create (output=0x673ae0, window=58720261) at gl-renderer.c:1661
3 0x00007ffff41c456b in x11_compositor_create_output (c=0x6388b0, x=0, y=0, width=1024, height=640, fullscreen=0, no_input=0,
configured_name=0x0, transform=0, scale=256) at compositor-x11.c:928
4 0x00007ffff41c5ca0 in x11_compositor_create (display=0x631950, fullscreen=0, no_input=0, use_pixman=0, argc=0x7fffffffda7c,
argv=0x7fffffffdd18, config_fd=14) at compositor-x11.c:1596
5 0x00007ffff41c63db in backend_init (display=0x631950, argc=0x7fffffffda7c, argv=0x7fffffffdd18, config_fd=14) at compositor-x11.c:1746
6 0x000000000040fcb7 in main (argc=1, argv=0x7fffffffdd18) at compositor.c:3293
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Cc: Alexander Larsson <alexl at redhat.com>
---
I guess this could use a companion fix to compositor-x11.c to exit if
the window creation or whatever fails, but I've no idea how to do that
with XCB. Mesa master already checks for NULL 'surf', I am just using an
older version.
---
src/compositor-x11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 9d6b6e7..9d106a9 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1595,7 +1595,7 @@ x11_compositor_create(struct wl_display *display,
for (i = output_count; i < count; i++) {
output = x11_compositor_create_output(c, x, 0, width, height,
fullscreen, no_input, NULL,
- WL_OUTPUT_TRANSFORM_NORMAL, wl_fixed_from_int(1));
+ WL_OUTPUT_TRANSFORM_NORMAL, 1);
if (output == NULL)
goto err_x11_input;
x = pixman_region32_extents(&output->base.region)->x2;
--
1.8.1.5
More information about the wayland-devel
mailing list