xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 14 00:55:36 UTC 2018


 test/xi2/protocol-common.c |    1 +
 test/xtest.c               |   11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit fde27b9b4814b18aca6ec587bd3cfe9ab04b0c72
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Nov 28 10:05:49 2018 +1000

    test: fix failing tests
    
    Broken since 69d8ea4a49793a94f821d1a328856901a1c02a5a because our fake screen
    didn't have a root window and writing the XKB rules prop would happily
    segfault. Fix this by setting up the required bits.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Tested-by: Michel Dänzer michel.daenzer at amd.com

diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
index b91692f55..8cd85dd05 100644
--- a/test/xi2/protocol-common.c
+++ b/test/xi2/protocol-common.c
@@ -259,6 +259,7 @@ init_simple(void)
     screen.DeviceCursorInitialize = device_cursor_init;
     screen.DeviceCursorCleanup = device_cursor_cleanup;
     screen.SetCursorPosition = set_cursor_pos;
+    screen.root = &root;
 
     dixResetPrivates();
     InitAtoms();
diff --git a/test/xtest.c b/test/xtest.c
index 05d7ec1d3..fc5e43368 100644
--- a/test/xtest.c
+++ b/test/xtest.c
@@ -29,6 +29,7 @@
 #include "input.h"
 #include "inputstr.h"
 #include "scrnintstr.h"
+#include "windowstr.h"
 #include "exevents.h"
 #include "extinit.h"
 #include "xkbsrv.h"
@@ -58,11 +59,15 @@ device_cursor_cleanup(DeviceIntPtr dev, ScreenPtr screen)
 static void
 xtest_init_devices(void)
 {
-    ScreenRec screen;
-    ClientRec server_client;
+    ScreenRec screen = {0};
+    ClientRec server_client = {0};
+    WindowRec root = {0};
+    WindowOptRec optional = {0};
 
     /* random stuff that needs initialization */
-    memset(&screen, 0, sizeof(screen));
+    root.drawable.id = 0xab;
+    root.optional = &optional;
+    screen.root = &root;
     screenInfo.numScreens = 1;
     screenInfo.screens[0] = &screen;
     screen.myNum = 0;


More information about the xorg-commit mailing list