reverted: --- xserver-xorg-video-ati-7.5.0/.dir-locals.el +++ xserver-xorg-video-ati-7.5.0.orig/.dir-locals.el @@ -1,12 +0,0 @@ -((nil - (indent-tabs-mode . t) - (tab-width . 8) - (c-basic-offset . 4) - (c-file-style . "stroustrup") - (fill-column . 78) - (eval . (progn - (c-set-offset 'innamespace '0) - (c-set-offset 'inline-open '0))) - ) - (makefile-mode (indent-tabs-mode . t)) - ) reverted: --- xserver-xorg-video-ati-7.5.0/autogen.sh +++ xserver-xorg-video-ati-7.5.0.orig/autogen.sh @@ -1,14 +0,0 @@ -#! /bin/sh - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd $srcdir - -autoreconf -v --install || exit 1 -cd $ORIGDIR || exit $? - -if test -z "$NOCONFIGURE"; then - $srcdir/configure --enable-maintainer-mode "$@" -fi diff -u xserver-xorg-video-ati-7.5.0/debian/changelog xserver-xorg-video-ati-7.5.0/debian/changelog --- xserver-xorg-video-ati-7.5.0/debian/changelog +++ xserver-xorg-video-ati-7.5.0/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-video-ati (1:7.5.0-1ubuntu3) wily; urgency=medium + + * debian/patches/xmir.patch: + - Drop XMir patch, we don't need it with new glamor based XMir (LP: #1462994) + + -- Robert Ancell Tue, 09 Jun 2015 15:16:34 +1200 + xserver-xorg-video-ati (1:7.5.0-1ubuntu2) vivid; urgency=medium * Bump build-depends to xorg 1.17. reverted: --- xserver-xorg-video-ati-7.5.0/debian/patches/series +++ xserver-xorg-video-ati-7.5.0.orig/debian/patches/series @@ -1 +0,0 @@ -xmir.patch reverted: --- xserver-xorg-video-ati-7.5.0/debian/patches/xmir.patch +++ xserver-xorg-video-ati-7.5.0.orig/debian/patches/xmir.patch @@ -1,607 +0,0 @@ -commit 8f7b9d5d20e8fe9dd718d0ab1d82a21dbbcd215d -Author: Christopher James Halse Rogers -Date: Mon Jul 22 17:02:17 2013 +1000 - - radeon/kms: Support running nested in a Mir compositor - - Signed-off-by: Christopher James Halse Rogers - ---- a/src/drmmode_display.c -+++ b/src/drmmode_display.c -@@ -1958,7 +1958,7 @@ - if (!miCreateDefColormap(pScreen)) - return FALSE; - /* all radeons support 10 bit CLUTs */ -- if (!xf86HandleColormaps(pScreen, 256, 10, -+ if (!xorgMir && !xf86HandleColormaps(pScreen, 256, 10, - drmmode_load_palette, NULL, - CMAP_PALETTED_TRUECOLOR - #if 0 /* This option messes up text mode! (eich@suse.de) */ ---- a/src/radeon.h -+++ b/src/radeon.h -@@ -87,6 +87,18 @@ - #include "picturestr.h" - #endif - -+#ifdef XMIR -+#include "xmir.h" -+#include "xf86Priv.h" -+#else -+#define xorgMir 0 -+typedef struct xmir_screen xmir_screen; -+typedef struct xmir_window xmir_window; -+void xmir_screen_for_each_damaged_window(void *, void *); -+int xmir_get_drm_fd(const char *busid); -+void xmir_screen_init(ScreenPtr screen, void *); -+#endif -+ - #include "compat-api.h" - - #include "simple_list.h" -@@ -480,9 +492,12 @@ - /* Perform vsync'ed SwapBuffers? */ - Bool swapBuffersWait; - -+ - /* cursor size */ - int cursor_w; - int cursor_h; -+ -+ xmir_screen *xmir; - } RADEONInfoRec, *RADEONInfoPtr; - - /* radeon_accel.c */ ---- a/src/radeon_bo_helper.c -+++ b/src/radeon_bo_helper.c -@@ -201,19 +201,25 @@ - } - - Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, -- struct radeon_surface *surface) -+ struct radeon_surface *surface, -+ uint32_t *tiling_flags, uint32_t *pitch) - { - ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); - RADEONInfoPtr info = RADEONPTR(pScrn); - struct radeon_bo *bo; - int ihandle = (int)(long)fd_handle; -- uint32_t size = ppix->devKind * ppix->drawable.height; -+ uint32_t size; - -- bo = radeon_gem_bo_open_prime(info->bufmgr, ihandle, size); -+ bo = radeon_gem_bo_open_prime(info->bufmgr, ihandle, 0); - if (!bo) - return FALSE; - - memset(surface, 0, sizeof(struct radeon_surface)); -+ radeon_bo_get_tiling(bo, tiling_flags, pitch); -+ if (*tiling_flags & RADEON_TILING_MACRO) -+ bo->size = *pitch * ppix->drawable.height; -+ else -+ bo->size = ppix->devKind * ppix->drawable.height; - - if (info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) { - -@@ -229,7 +235,14 @@ - /* we are requiring a recent enough libdrm version */ - surface->flags |= RADEON_SURF_HAS_TILE_MODE_INDEX; - surface->flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); -- surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE); -+ -+ if (*tiling_flags & RADEON_TILING_MACRO) -+ surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE); -+ else if (*tiling_flags & RADEON_TILING_MICRO) -+ surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_1D, MODE); -+ else -+ surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE); -+ - if (radeon_surface_best(info->surf_man, surface)) { - return FALSE; - } -@@ -238,8 +251,11 @@ - } - /* we have to post hack the surface to reflect the actual size - of the shared pixmap */ -- surface->level[0].pitch_bytes = ppix->devKind; -- surface->level[0].nblk_x = ppix->devKind / surface->bpe; -+ if (*tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO)) -+ surface->level[0].pitch_bytes = *pitch; -+ else -+ surface->level[0].pitch_bytes = *pitch = ppix->devKind; -+ surface->level[0].nblk_x = surface->level[0].pitch_bytes / surface->bpe; - } - radeon_set_pixmap_bo(ppix, bo); - ---- a/src/radeon_bo_helper.h -+++ b/src/radeon_bo_helper.h -@@ -33,6 +33,7 @@ - - extern Bool - radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, -- struct radeon_surface *surface); -+ struct radeon_surface *surface, -+ uint32_t *tiling_flags, uint32_t *pitch); - - #endif /* RADEON_BO_HELPER_H */ ---- a/src/radeon_dri2.c -+++ b/src/radeon_dri2.c -@@ -1539,6 +1539,18 @@ - - #endif /* USE_DRI2_SCHEDULING */ - -+#if DRI2INFOREC_VERSION >= 8 && defined(XMIR) -+static int radeon_dri2_auth_magic(ScreenPtr pScreen, uint32_t magic) -+{ -+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); -+ RADEONInfoPtr info = RADEONPTR(pScrn); -+ -+ if (xorgMir) -+ return xmir_auth_drm_magic(info->xmir, magic); -+ else -+ return drmAuthMagic(info->dri2.drm_fd, magic); -+} -+#endif - - Bool - radeon_dri2_screen_init(ScreenPtr pScreen) -@@ -1548,7 +1560,7 @@ - DRI2InfoRec dri2_info = { 0 }; - #ifdef USE_DRI2_SCHEDULING - const char *driverNames[2]; -- Bool scheduling_works = TRUE; -+ Bool scheduling_works = !xorgMir; - #endif - - if (!info->dri2.available) -@@ -1634,6 +1646,11 @@ - } - #endif - -+#if DRI2INFOREC_VERSION >= 9 && defined(XMIR) -+ dri2_info.version = 8; -+ dri2_info.AuthMagic2 = radeon_dri2_auth_magic; -+#endif -+ - #if DRI2INFOREC_VERSION >= 9 - dri2_info.version = 9; - dri2_info.CreateBuffer2 = radeon_dri2_create_buffer2; ---- a/src/radeon_exa.c -+++ b/src/radeon_exa.c -@@ -325,12 +325,12 @@ - Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle) - { - struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(ppix); -+ uint32_t tiling_flags, pitch; - -- if (!radeon_set_shared_pixmap_backing(ppix, fd_handle, &driver_priv->surface)) -+ if (!radeon_set_shared_pixmap_backing(ppix, fd_handle, &driver_priv->surface, &tiling_flags, &pitch)) - return FALSE; - - driver_priv->shared = TRUE; -- driver_priv->tiling_flags = 0; - return TRUE; - } - #endif ---- a/src/radeon_glamor.c -+++ b/src/radeon_glamor.c -@@ -297,14 +297,15 @@ - ScrnInfoPtr scrn = xf86ScreenToScrn(screen); - struct radeon_surface surface; - struct radeon_pixmap *priv; -+ uint32_t tiling_flags, pitch; - -- if (!radeon_set_shared_pixmap_backing(pixmap, handle, &surface)) -+ if (!radeon_set_shared_pixmap_backing(pixmap, handle, &surface, &tiling_flags, &pitch)) - return FALSE; - - priv = radeon_get_pixmap_private(pixmap); -- priv->stride = pixmap->devKind; -+ priv->stride = pitch; - priv->surface = surface; -- priv->tiling_flags = 0; -+ priv->tiling_flags = tiling_flags; - - if (!radeon_glamor_create_textured_pixmap(pixmap)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, ---- a/src/radeon_kms.c -+++ b/src/radeon_kms.c -@@ -230,10 +230,15 @@ - return FALSE; - pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS; - -- if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) -+ if (xorgMir) { -+ if (!xf86SetDesiredModes(pScrn)) -+ return FALSE; -+ } -+ else if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) - return FALSE; - -- drmmode_uevent_init(pScrn, &info->drmmode); -+ if (!xorgMir) -+ drmmode_uevent_init(pScrn, &info->drmmode); - - if (info->r600_shadow_fb) { - pixmap = pScreen->GetScreenPixmap(pScreen); -@@ -295,6 +300,66 @@ - } - #endif - -+#ifdef XMIR -+static void -+radeon_xmir_copy_to_mir(xmir_window *xmir_win, RegionPtr region) -+{ -+ WindowPtr win = xmir_window_to_windowptr(xmir_win); -+ PixmapPtr src = (*win->drawable.pScreen->GetWindowPixmap)(win); -+ ScreenPtr pScreen = src->drawable.pScreen; -+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); -+ RADEONInfoPtr info = RADEONPTR(pScrn); -+ BoxPtr output_box = xmir_window_get_drawable_region(xmir_win); -+ BoxPtr damage_box = RegionExtents(region); -+ if (info->accel_state->exa) { -+ PixmapPtr dst; -+ int ret; -+ int fd_copy = dup(xmir_window_get_fd(xmir_win)); -+ /* TODO: Create this scratch pixmap once to avoid allocation overhead */ -+ dst = pScreen->CreatePixmap(pScreen, 0, 0, pScrn->depth, 0); -+ if (dst == NullPixmap) -+ return; -+ -+ if (!pScreen->ModifyPixmapHeader(dst, -+ output_box->x2 - output_box->x1, -+ output_box->y2 - output_box->y1, -+ pScrn->depth, pScrn->bitsPerPixel, -+ xmir_window_get_stride(xmir_win), NULL)) -+ goto cleanup_dst; -+ -+ -+ info->accel_state->exa->SetSharedPixmapBacking(dst, (void*)(size_t)fd_copy); -+ -+ ret = info->accel_state->exa->PrepareCopy (src, dst, -+ -1, -1, GXcopy, FB_ALLONES); -+ if (!ret) -+ goto cleanup_dst; -+ info->accel_state->exa->Copy (dst, -+ damage_box->x1, damage_box->y1, -+ damage_box->x1 - output_box->x1, -+ damage_box->y1 - output_box->y1, -+ output_box->x2 - output_box->x1, -+ output_box->y2 - output_box->y1); -+ info->accel_state->exa->DoneCopy (dst); -+ -+ radeon_cs_flush_indirect(pScrn); -+ -+ xmir_submit_rendering_for_window(xmir_win, region); -+cleanup_dst: -+ pScreen->DestroyPixmap(dst); -+ } else if (0) { -+ /* TODO: glamor accel */ -+ } else { -+ /* Software copy; let's just give up */ -+ } -+} -+ -+static xmir_driver xmir_radeon_driver = { -+ XMIR_DRIVER_VERSION, -+ radeon_xmir_copy_to_mir -+}; -+#endif -+ - static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL) - { - SCREEN_PTR(arg); -@@ -312,6 +377,10 @@ - #ifdef RADEON_PIXMAP_SHARING - radeon_dirty_update(pScreen); - #endif -+#ifdef XMIR -+ if(info->xmir) -+ xmir_screen_for_each_damaged_window(info->xmir, radeon_xmir_copy_to_mir); -+#endif - } - - static void -@@ -608,6 +677,17 @@ - dev->domain, dev->bus, dev->dev, dev->func); - #endif - -+ if (xorgMir) { -+ fd = xmir_get_drm_fd(busid); -+ -+ if (fd == -1) -+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, -+ "[drm] Failed to retrieve DRM device %s from Mir\n", -+ busid); -+ free(busid); -+ return fd; -+ } -+ - fd = drmOpen(NULL, busid); - if (fd == -1) - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, -@@ -638,6 +718,9 @@ - if (info->dri2.drm_fd == -1) - return FALSE; - -+ if (xorgMir) -+ return TRUE; -+ - /* Check that what we opened was a master or a master-capable FD, - * by setting the version of the interface we'll use to talk to it. - * (see DRIOpenDRMMaster() in DRI1) -@@ -854,6 +937,14 @@ - if (!RADEONPreInitChipType_KMS(pScrn)) - goto fail; - -+#ifdef XMIR -+ if (xorgMir) { -+ info->xmir = xmir_screen_create(pScrn); -+ if (info->xmir == NULL) -+ goto fail; -+ } -+#endif -+ - if (radeon_open_drm_master(pScrn) == FALSE) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup failed\n"); - goto fail; -@@ -928,10 +1019,14 @@ - } - - info->swapBuffersWait = xf86ReturnOptValBool(info->Options, -- OPTION_SWAPBUFFERS_WAIT, TRUE); -+ OPTION_SWAPBUFFERS_WAIT, !xorgMir); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "SwapBuffers wait for vsync: %sabled\n", info->swapBuffersWait ? "en" : "dis"); - -+ -+#ifdef XMIR -+ if(!info->xmir) { -+#endif - if (drmmode_pre_init(pScrn, &info->drmmode, pScrn->bitsPerPixel / 8) == FALSE) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup failed\n"); - goto fail; -@@ -941,7 +1036,10 @@ - pRADEONEnt->HasCRTC2 = FALSE; - else - pRADEONEnt->HasCRTC2 = TRUE; -- -+#ifdef XMIR -+ } else if (!xmir_screen_pre_init(pScrn, info->xmir, &xmir_radeon_driver)) -+ goto fail; -+#endif - - /* fix up cloning on rn50 cards - * since they only have one crtc sometimes the xserver doesn't assign -@@ -1121,7 +1219,7 @@ - #ifdef XF86_PDEV_SERVER_FD - RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); - #endif -- int err; -+ int err = 0; - - #ifdef XF86_PDEV_SERVER_FD - if (pRADEONEnt->platform_dev && -@@ -1129,7 +1227,8 @@ - return TRUE; - #endif - -- err = drmSetMaster(info->dri2.drm_fd); -+ if (!xorgMir) -+ err = drmSetMaster(info->dri2.drm_fd); - if (err) - ErrorF("Unable to retrieve master\n"); - -@@ -1147,6 +1246,11 @@ - return; - #endif - -+#ifdef XMIR -+ if (info->xmir) { -+/* xmir_screen_close(pScreen, info->xmir);*/ -+ } else -+#endif - drmDropMaster(info->dri2.drm_fd); - } - -@@ -1204,6 +1308,21 @@ - RADEONFreeRec(pScrn); - } - -+static void -+RADEONSetScreenPixmap_KMS(PixmapPtr pixmap) -+{ -+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pixmap->drawable.pScreen); -+ RADEONInfoPtr info = RADEONPTR(pScrn); -+ -+ if (info->accel_state->exa) -+ exaMoveInPixmap(pixmap); -+ -+ info->front_bo = radeon_get_pixmap_bo(pixmap); -+ memmove(&info->front_surface, radeon_get_pixmap_surface(pixmap), sizeof info->front_surface); -+ -+ pixmap->drawable.pScreen->devPrivate = pixmap; -+} -+ - Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) - { - ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); -@@ -1236,7 +1355,8 @@ - "failed to initialise GEM buffer manager"); - return FALSE; - } -- drmmode_set_bufmgr(pScrn, &info->drmmode, info->bufmgr); -+ if (!info->xmir) -+ drmmode_set_bufmgr(pScrn, &info->drmmode, info->bufmgr); - - if (!info->csm) - info->csm = radeon_cs_manager_gem_ctor(info->dri2.drm_fd); -@@ -1360,7 +1480,10 @@ - /* Cursor setup */ - miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); - -- if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) { -+ if (info->xmir) -+ xmir_screen_init(pScreen, info->xmir); -+ -+ if (!info->xmir && !xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) { - if (RADEONCursorInit_KMS(pScreen)) { - } - } -@@ -1402,6 +1525,8 @@ - info->CreateScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS; - -+ pScreen->SetScreenPixmap = RADEONSetScreenPixmap_KMS; -+ - #ifdef RADEON_PIXMAP_SHARING - pScreen->StartPixmapTracking = PixmapStartDirtyTracking; - pScreen->StopPixmapTracking = PixmapStopDirtyTracking; -@@ -1447,7 +1572,9 @@ - - pScrn->vtSema = TRUE; - -- if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) -+ if (xorgMir) -+ return xf86SetDesiredModes(pScrn); -+ else if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) - return FALSE; - - return TRUE; -@@ -1588,6 +1715,7 @@ - } - info->front_surface = surface; - } -+ if(!xorgMir) - { - int cursor_size; - int c; ---- a/src/radeon_probe.c -+++ b/src/radeon_probe.c -@@ -40,6 +40,7 @@ - * KMS support - Dave Airlie - */ - -+#include "radeon.h" - #include "radeon_probe.h" - #include "radeon_version.h" - #include "atipciids.h" -@@ -58,6 +59,11 @@ - #include - #endif - -+#ifdef XMIR -+#include -+#include -+#endif -+ - #include "radeon_chipset_gen.h" - - #include "radeon_pci_chipset_gen.h" -@@ -115,6 +121,33 @@ - } - - static Bool -+radeon_check_mir_support(ScrnInfoPtr pScrn, struct pci_device *pci_dev) -+{ -+ char *busIdString; -+ int fd; -+ -+ if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) { -+ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, -+ "[XMir] No DRICreatePCIBusID symbol, unable to find Radeon device.\n"); -+ return FALSE; -+ } -+ -+ busIdString = DRICreatePCIBusID(pci_dev); -+ fd = xmir_get_drm_fd(busIdString); -+ free(busIdString); -+ -+ if (fd < 0) { -+ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, -+ "[XMir] Radeon device not managed by Mir.\n"); -+ return FALSE; -+ } -+ -+ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, -+ "[XMir] Using Radeon device from Mir.\n"); -+ return TRUE; -+} -+ -+static Bool - radeon_get_scrninfo(int entity_num, void *pci_dev) - { - ScrnInfoPtr pScrn = NULL; -@@ -128,7 +161,13 @@ - return FALSE; - - if (pci_dev) { -+#ifdef XMIR -+ if (xorgMir && !radeon_check_mir_support(pScrn, pci_dev)) -+ return FALSE; -+ else if (!radeon_kernel_mode_enabled(pScrn, pci_dev)) { -+#else - if (!radeon_kernel_mode_enabled(pScrn, pci_dev)) { -+#endif - return FALSE; - } - } -@@ -201,6 +240,12 @@ - case GET_REQUIRED_HW_INTERFACES: - flag = (CARD32 *)data; - (*flag) = 0; -+ -+#ifdef XMIR -+ if (xorgMir) -+ (*flag) |= HW_SKIP_CONSOLE; -+#endif -+ - return TRUE; - #if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(1,15,99,0,0) - case SUPPORTS_SERVER_FDS: -@@ -225,14 +270,20 @@ - if (!dev->pdev) - return FALSE; - -- if (flags & PLATFORM_PROBE_GPU_SCREEN) -- scr_flags = XF86_ALLOCATE_GPU_SCREEN; -+ if (flags & PLATFORM_PROBE_GPU_SCREEN) { -+ scr_flags = XF86_ALLOCATE_GPU_SCREEN; -+ } -+ -+ - - pScrn = xf86AllocateScreen(pDriver, scr_flags); - if (xf86IsEntitySharable(entity_num)) - xf86SetEntityShared(entity_num); - xf86AddEntityToScreen(pScrn, entity_num); - -+ if (xorgMir && !radeon_check_mir_support(pScrn, dev->pdev)) -+ return FALSE; -+ - if (!radeon_kernel_mode_enabled(pScrn, dev->pdev)) - return FALSE; - ---- a/src/radeon_video.c -+++ b/src/radeon_video.c -@@ -70,7 +70,10 @@ - Bool radeon_crtc_is_enabled(xf86CrtcPtr crtc) - { - drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; -- return drmmode_crtc->dpms_mode == DPMSModeOn; -+ if (drmmode_crtc != NULL) -+ return drmmode_crtc->dpms_mode == DPMSModeOn; -+ else /* We're not in control; bail */ -+ return FALSE; - } - - uint32_t radeon_get_interpolated_vblanks(xf86CrtcPtr crtc) -@@ -92,6 +95,9 @@ - if (!pScrn->vtSema) - return NULL; - -+ if (xorgMir) -+ return NULL; -+ - box.x1 = x1; - box.x2 = x2; - box.y1 = y1;