Hi, Patch strips redundant code from xf86WcmDesktopSize function as there is no need for special handling of one screen case if we can do it in the same loop as for multi screen.
-- Przemo
>From e95bf8249d8a78e99d7bc49097dbf91edc706125 Mon Sep 17 00:00:00 2001 From: Przemo Firszt <[email protected]> Date: Fri, 18 Dec 2009 14:13:27 +0000 Subject: [PATCH 2/2] Strip redundant code from xf86WcmDesktopSize function No need for special handling of one screen case. Signed-off-by: Przemo Firszt <[email protected]> --- src/xf86Wacom.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c index 7c484e9..8d05c8f 100644 --- a/src/xf86Wacom.c +++ b/src/xf86Wacom.c @@ -118,14 +118,8 @@ static void xf86WcmDesktopSize(LocalDevicePtr local) int i = 0, minX = 0, minY = 0, maxX = 0, maxY = 0; xf86WcmInitialScreens(local); - minX = priv->screenTopX[0]; - minY = priv->screenTopY[0]; - maxX = priv->screenBottomX[0]; - maxY = priv->screenBottomY[0]; - if (priv->numScreen != 1) + for (i = 0; i < priv->numScreen; i++) { - for (i = 1; i < priv->numScreen; i++) - { if (priv->screenTopX[i] < minX) minX = priv->screenTopX[i]; if (priv->screenTopY[i] < minY) @@ -134,7 +128,6 @@ static void xf86WcmDesktopSize(LocalDevicePtr local) maxX = priv->screenBottomX[i]; if (priv->screenBottomY[i] > maxY) maxY = priv->screenBottomY[i]; - } } priv->maxWidth = maxX - minX; priv->maxHeight = maxY - minY; -- 1.6.5.2
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
