Fix for https://bugs.freedesktop.org/show_bug.cgi?id=69357
Commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349 (ephyr: Fix crash on 24bpp host framebuffer) assumed that Xephyr's depth was always the same as the host. Revert to previous behaviour but only when host_depth does not match server_depth. This makes Xephyr with 8 or 16 depth work on a 24 or 32bpp host while keeping the fix introduced via bd58ebe. Signed-off-by: Michele Baldessari <[email protected]> --- hw/kdrive/ephyr/hostx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 5071289..90db002 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -697,9 +697,10 @@ hostx_screen_init(EphyrScreenInfo screen, malloc(host_screen->ximg->bytes_per_line * buffer_height); } - *bytes_per_line = host_screen->ximg->bytes_per_line; - *bits_per_pixel = host_screen->ximg->bits_per_pixel; - + if (host_depth_matches_server(host_screen)) { + *bytes_per_line = host_screen->ximg->bytes_per_line; + *bits_per_pixel = host_screen->ximg->bits_per_pixel; + } XResizeWindow(HostX.dpy, host_screen->win, width, height); /* Ask the WM to keep our size static */ -- 1.8.3.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
