Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / state_trackers / egl / x11 / native_x11.c
index dd3c9f8b6ac6adce133740ddd0c51013b28aa8a8..c6eb17ab1ac7424f078c0b206a6a4b77e248f6e7 100644 (file)
@@ -22,6 +22,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <stdio.h>
 #include <string.h>
 #include "util/u_debug.h"
 #include "util/u_memory.h"
@@ -69,7 +70,7 @@ native_create_probe(EGLNativeDisplayType dpy)
    xscr = x11_screen_create(xdpy, scr);
    if (xscr) {
       if (x11_screen_support(xscr, X11_SCREEN_EXTENSION_DRI2)) {
-         driver_name = x11_screen_probe_dri2(xscr);
+         driver_name = x11_screen_probe_dri2(xscr, NULL, NULL);
          if (driver_name)
             nprobe->data = strdup(driver_name);
       }
@@ -125,7 +126,8 @@ native_get_name(void)
 }
 
 struct native_display *
-native_create_display(EGLNativeDisplayType dpy)
+native_create_display(EGLNativeDisplayType dpy,
+                      struct native_event_handler *event_handler)
 {
    struct native_display *ndpy = NULL;
    boolean force_sw;
@@ -135,14 +137,14 @@ native_create_display(EGLNativeDisplayType dpy)
 
    force_sw = debug_get_bool_option("EGL_SOFTWARE", FALSE);
    if (api && !force_sw) {
-      ndpy = x11_create_dri2_display(dpy, api);
+      ndpy = x11_create_dri2_display(dpy, event_handler, api);
    }
 
    if (!ndpy) {
       EGLint level = (force_sw) ? _EGL_INFO : _EGL_WARNING;
 
       _eglLog(level, "use software fallback");
-      ndpy = x11_create_ximage_display(dpy, TRUE);
+      ndpy = x11_create_ximage_display(dpy, event_handler);
    }
 
    return ndpy;