diff --git a/hw/kdrive/ephyr/ephyrdri.c b/hw/kdrive/ephyr/ephyrdri.c index 95ace7c25..3f470f8b0 100644 --- a/hw/kdrive/ephyr/ephyrdri.c +++ b/hw/kdrive/ephyr/ephyrdri.c @@ -216,6 +216,7 @@ ephyrDRIGetDrawableInfo (int a_screen, drm_clip_rect_t **a_back_clip_rects) { Bool is_ok=FALSE; + Display *dpy=hostx_get_display () ; DrawablePtr drawable = a_drawable ; EphyrHostWindowAttributes attrs ; @@ -229,20 +230,29 @@ ephyrDRIGetDrawableInfo (int a_screen, EPHYR_LOG_ERROR ("failed to query host window attributes\n") ; goto out; } - *a_x = drawable->x + attrs.x; - *a_y = drawable->y + attrs.y; - *a_w = drawable->width + attrs.width ; - *a_h = drawable->height + attrs.height ; - *a_num_clip_rects = 0 ; - *a_clip_rects = NULL ; - *a_back_x = 0; - *a_back_y = 0 ; - *a_num_back_clip_rects = 0 ; - *a_back_clip_rects = NULL ; + if (!XF86DRIGetDrawableInfo (dpy, a_screen, hostx_get_window (), + a_index, a_stamp, + a_x, a_y, + a_w, a_h, + a_num_clip_rects, a_clip_rects, + a_back_x, a_back_y, + a_num_back_clip_rects, + a_back_clip_rects)) { + EPHYR_LOG_ERROR ("XF86DRIGetDrawableInfo ()\n") ; + goto out ; + } + EPHYR_LOG ("host x,y,w,h: (%d,%d,%d,%d)\n", *a_x, *a_y, *a_w, *a_h) ; + *a_x += drawable->x ; + *a_y += drawable->y ; + *a_back_x = *a_x ; + *a_back_y = *a_y ; + *a_w = drawable->width; + *a_h = drawable->height; is_ok = TRUE ; out: - EPHYR_LOG ("leave\n") ; + EPHYR_LOG ("leave. index:%d, stamp:%d, x,y:(%d,%d), w,y:(%d,%d)\n", + *a_index, *a_stamp, *a_x, *a_y, *a_w, *a_h) ; return is_ok ; } diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index d54da2164..443fe9d57 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -446,13 +446,14 @@ ProcXF86DRIDestroyDrawable (register ClientPtr client) static int ProcXF86DRIGetDrawableInfo (register ClientPtr client) { - xXF86DRIGetDrawableInfoReply rep; + xXF86DRIGetDrawableInfoReply rep; DrawablePtr drawable; - int X, Y, W, H, backX, backY, rc; - drm_clip_rect_t * pClipRects, *pClippedRects; - drm_clip_rect_t * pBackClipRects; + int X=0, Y=0, W=0, H=0, backX=0, backY=0, rc=0; + drm_clip_rect_t *pClipRects=NULL, *pClippedRects=NULL; + drm_clip_rect_t *pBackClipRects=NULL; EPHYR_LOG ("enter\n") ; + memset (&rep, 0, sizeof (rep)) ; REQUEST(xXF86DRIGetDrawableInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDrawableInfoReq); if (stuff->screen >= screenInfo.numScreens) { diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c index 071a58154..21a109e64 100644 --- a/hw/kdrive/ephyr/ephyrhostglx.c +++ b/hw/kdrive/ephyr/ephyrhostglx.c @@ -89,10 +89,14 @@ ephyrHostGLXQueryVersion (int *a_major, int *a_minor) EPHYR_RETURN_VAL_IF_FAIL (a_major && a_minor, FALSE) ; EPHYR_LOG ("enter\n") ; + *a_major = 1 ; + *a_minor = 2 ; + /* if (!glXQueryVersion (dpy, a_major, a_minor)) { EPHYR_LOG_ERROR ("glxQueryVersion() failed\n") ; goto out ; } + */ is_ok = TRUE ; out: