compositor-x11: fix default output scale

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@collabora.co.uk>
Cc: Alexander Larsson <alexl@redhat.com>
dev
Pekka Paalanen 12 years ago committed by Kristian Høgsberg
parent 785e1f34c1
commit daaddc6032
  1. 2
      src/compositor-x11.c

@ -1595,7 +1595,7 @@ x11_compositor_create(struct wl_display *display,
for (i = output_count; i < count; i++) { for (i = output_count; i < count; i++) {
output = x11_compositor_create_output(c, x, 0, width, height, output = x11_compositor_create_output(c, x, 0, width, height,
fullscreen, no_input, NULL, fullscreen, no_input, NULL,
WL_OUTPUT_TRANSFORM_NORMAL, wl_fixed_from_int(1)); WL_OUTPUT_TRANSFORM_NORMAL, 1);
if (output == NULL) if (output == NULL)
goto err_x11_input; goto err_x11_input;
x = pixman_region32_extents(&output->base.region)->x2; x = pixman_region32_extents(&output->base.region)->x2;

Loading…
Cancel
Save