Hello community, here is the log from the commit of package xorg-x11-server for openSUSE:Factory checked in at 2016-02-29 09:12:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xorg-x11-server (Old) and /work/SRC/openSUSE:Factory/.xorg-x11-server.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xorg-x11-server" Changes: -------- --- /work/SRC/openSUSE:Factory/xorg-x11-server/xorg-x11-server.changes 2016-02-17 12:26:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.xorg-x11-server.new/xorg-x11-server.changes 2016-02-29 09:12:37.000000000 +0100 @@ -1,0 +2,13 @@ +Thu Feb 25 20:54:32 UTC 2016 - [email protected] + +- Add 50-extensions.conf + Disable the DGA extension by default (boo#947695). + +------------------------------------------------------------------- +Thu Feb 25 20:53:20 UTC 2016 - [email protected] + +- Replaced u_confine_to_shape.diff + by u_01-Improved-ConfineToShape.patch + and u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch. + +------------------------------------------------------------------- Old: ---- u_confine_to_shape.diff New: ---- 50-extensions.conf u_01-Improved-ConfineToShape.patch u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-server.spec ++++++ --- /var/tmp/diff_new_pack.AP1685/_old 2016-02-29 09:12:39.000000000 +0100 +++ /var/tmp/diff_new_pack.AP1685/_new 2016-02-29 09:12:39.000000000 +0100 @@ -37,6 +37,7 @@ Source2: README.updates Source3: xorgcfg.tar.bz2 Source4: xorg-backtrace +Source5: 50-extensions.conf # RPM Macros to be installed. The ABI Versions will be injected by configure. Source90: xorg-x11-server.macros.in # Source91 and Source99 are used to ensure proper ABI provides. @@ -163,7 +164,8 @@ Patch4: N_fix_fglrx_screendepth_issue.patch Patch6: N_fix-dpi-values.diff -Patch101: u_confine_to_shape.diff +Patch100: u_01-Improved-ConfineToShape.patch +Patch101: u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch # PATCH-FIX-UPSTREAM u_x86emu-include-order.patch [email protected] -- Change include order to avoid conflict with system header, remove duplicate definitions Patch102: u_x86emu-include-order.patch Patch104: u_xorg-server-xdmcp.patch @@ -268,7 +270,8 @@ %patch4 -p0 %patch6 -p0 # -%patch101 +%patch100 -p1 +%patch101 -p1 %patch102 -p1 %patch104 -p1 %patch106 -p1 @@ -376,6 +379,7 @@ %ifnarch s390 s390x mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d cp %{buildroot}/%{_datadir}/X11/xorg.conf.d/10-quirks.conf %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/ +%{__install} -m 644 %{S:5} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/ %endif %endif %if 0%{?suse_version} < 1315 @@ -459,6 +463,7 @@ %if 0%{?suse_version} > 1120 %dir %{_sysconfdir}/X11/xorg.conf.d %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-quirks.conf +%config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/50-extensions.conf %dir %{_datadir}/X11/xorg.conf.d %{_datadir}/X11/xorg.conf.d/10-*.conf %endif ++++++ 50-extensions.conf ++++++ # Add extensions to be disabled. This may be needed as some # extra modules may add extensions which cause the maximum # number of extensions possible to be exceeded. # # SUSE Default: disable DGA. Section "Extensions" Option "XFree86-DGA" "Disable" EndSection++++++ u_01-Improved-ConfineToShape.patch ++++++ From: Keith Packard <[email protected]> Date: Fri Oct 4 16:00:49 2013 -0700 Subject: [PATCH 1/2]Improved ConfineToShape Patch-mainline: to be upstreamed Git-commit: 0d0951624db7ae4686b362c7c6307f1ed46c8579 References: bnc#62146 Signed-off-by: Egbert Eich <[email protected]> Find the box within the region which is closest to the point and move there. Signed-off-by: Keith Packard <[email protected]> --- dix/events.c | 74 ++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/dix/events.c b/dix/events.c index efaf91d..5244781 100644 --- a/dix/events.c +++ b/dix/events.c @@ -666,37 +666,63 @@ SetCriticalEvent(int event) criticalEvents[event >> 3] |= 1 << (event & 7); } +static uint32_t +ConfineToBox(int x, int y, BoxPtr box, int *px, int *py) +{ + int dx, dy; + + *px = x; + *py = y; + + if (*px < box->x1) + *px = box->x1; + else if (*px >= box->x2) + *px = box->x2 - 1; + + if (*py < box->y1) + *py = box->y1; + else if (*py >= box->y2) + *py = box->y2 - 1; + + dx = x - *px; + if (dx < 0) dx = -dx; + if (dx > 32767) + dx = 32767; + dy = y - *py; + if (dy < 0) dy = -dy; + if (dy > 32767) + dy = 32767; + + return (uint32_t) dx * (uint32_t) dx + (uint32_t) dy * (uint32_t) dy; +} + void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) { - BoxRec box; + BoxPtr box; + int nbox; int x = *px, y = *py; - int incx = 1, incy = 1; + int bx, by; + uint32_t box_dist_2; + int best_x = 0, best_y = 0; + uint32_t best_dist_2 = 0; + int i; - if (RegionContainsPoint(shape, x, y, &box)) + if (RegionContainsPoint(shape, x, y, NULL)) return; - box = *RegionExtents(shape); - /* this is rather crude */ - do { - x += incx; - if (x >= box.x2) { - incx = -1; - x = *px - 1; - } - else if (x < box.x1) { - incx = 1; - x = *px; - y += incy; - if (y >= box.y2) { - incy = -1; - y = *py - 1; - } - else if (y < box.y1) - return; /* should never get here! */ + box = REGION_RECTS(shape); + nbox = REGION_NUM_RECTS(shape); + for (i = 0; i < nbox; i++) { + box_dist_2 = ConfineToBox(x, y, &box[i], &bx, &by); + if (i == 0 || box_dist_2 < best_dist_2) { + best_dist_2 = box_dist_2; + best_x = bx; + best_y = by; } - } while (!RegionContainsPoint(shape, x, y, &box)); - *px = x; - *py = y; + } + + *px = best_x; + *py = best_y; } static void ++++++ u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch ++++++ From: Egbert Eich <[email protected]> Date: Fri Feb 7 09:19:45 2014 +0100 Subject: [PATCH 2/2]DIX/ConfineTo: Don't bother about the bounding box when grabbing a shaped window Patch-mainline: to be upstreamed Git-commit: 3f7cc03e47a35d05ffb3f7a6de521c41638b4c7a References: bnc#62146 Signed-off-by: Egbert Eich <[email protected]> Limiting the the cursor coordinates on the bounding box of a shaped window before applying ConfineTo leads to strange cursor placement when the pointer is located outside the vertial and horizontal strip of this bounding box. Ignoring the bounding box when a shape is set leads to the correct behavior. Signed-off-by: Egbert Eich <[email protected]> Reviewed-by: Keith Packard <[email protected]> --- dix/events.c | 78 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 35 deletions(-) diff --git a/dix/events.c b/dix/events.c index 5244781..8aa4af7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -753,17 +753,19 @@ CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); } - /* constrain the pointer to those limits */ - if (new.x < pSprite->physLimits.x1) - new.x = pSprite->physLimits.x1; - else if (new.x >= pSprite->physLimits.x2) - new.x = pSprite->physLimits.x2 - 1; - if (new.y < pSprite->physLimits.y1) - new.y = pSprite->physLimits.y1; - else if (new.y >= pSprite->physLimits.y2) - new.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); + else { + /* constrain the pointer to those limits */ + if (new.x < pSprite->physLimits.x1) + new.x = pSprite->physLimits.x1; + else if (new.x >= pSprite->physLimits.x2) + new.x = pSprite->physLimits.x2 - 1; + if (new.y < pSprite->physLimits.y1) + new.y = pSprite->physLimits.y1; + else if (new.y >= pSprite->physLimits.y2) + new.y = pSprite->physLimits.y2 - 1; + } if (( #ifdef PANORAMIX noPanoramiXExtension && @@ -914,7 +916,8 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, return; } #endif - pSprite->hotLimits = *RegionExtents(&pWin->borderSize); +// if (!wBoundingShape(pWin)) + pSprite->hotLimits = *RegionExtents(&pWin->borderSize); pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; CheckPhysLimits(pDev, pSprite->current, generateEvents, @@ -3039,17 +3042,19 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) pSprite->hot.x = ev->root_x; pSprite->hot.y = ev->root_y; - if (pSprite->hot.x < pSprite->physLimits.x1) - pSprite->hot.x = pSprite->physLimits.x1; - else if (pSprite->hot.x >= pSprite->physLimits.x2) - pSprite->hot.x = pSprite->physLimits.x2 - 1; - if (pSprite->hot.y < pSprite->physLimits.y1) - pSprite->hot.y = pSprite->physLimits.y1; - else if (pSprite->hot.y >= pSprite->physLimits.y2) - pSprite->hot.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); + else { + if (pSprite->hot.x < pSprite->physLimits.x1) + pSprite->hot.x = pSprite->physLimits.x1; + else if (pSprite->hot.x >= pSprite->physLimits.x2) + pSprite->hot.x = pSprite->physLimits.x2 - 1; + if (pSprite->hot.y < pSprite->physLimits.y1) + pSprite->hot.y = pSprite->physLimits.y1; + else if (pSprite->hot.y >= pSprite->physLimits.y2) + pSprite->hot.y = pSprite->physLimits.y2 - 1; + } pSprite->hotPhys = pSprite->hot; if ((pSprite->hotPhys.x != ev->root_x) || @@ -3516,17 +3521,18 @@ XineramaWarpPointer(ClientPtr client) x += stuff->dstX; y += stuff->dstY; - if (x < pSprite->physLimits.x1) - x = pSprite->physLimits.x1; - else if (x >= pSprite->physLimits.x2) - x = pSprite->physLimits.x2 - 1; - if (y < pSprite->physLimits.y1) - y = pSprite->physLimits.y1; - else if (y >= pSprite->physLimits.y2) - y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); - + else { + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + } XineramaSetCursorPosition(PickPointer(client), x, y, TRUE); return Success; @@ -3619,16 +3625,18 @@ ProcWarpPointer(ClientPtr client) y = newScreen->height - 1; if (newScreen == pSprite->hotPhys.pScreen) { - if (x < pSprite->physLimits.x1) - x = pSprite->physLimits.x1; - else if (x >= pSprite->physLimits.x2) - x = pSprite->physLimits.x2 - 1; - if (y < pSprite->physLimits.y1) - y = pSprite->physLimits.y1; - else if (y >= pSprite->physLimits.y2) - y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(dev, pSprite->hotShape, &x, &y); + else { + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + } (*newScreen->SetCursorPosition) (dev, newScreen, x, y, TRUE); } else if (!PointerConfinedToScreen(dev)) {
