Re: [Linuxwacom-devel] [PATCH] dixScreenOrigins has been removed from server
On Wed, 2010-06-16 at 13:53 +1000, Peter Hutterer wrote: On Tue, Jun 15, 2010 at 09:54:41PM -0400, Gaetan Nadon wrote: Since commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 Fields x and y have been added to ScreenRec. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- src/wcmCommon.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 4a70195..9370744 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1791,10 +1791,10 @@ void wcmInitialScreens(LocalDevicePtr local) { if (screenInfo.numScreens 1) { - priv-screenTopX[i] = dixScreenOrigins[i].x; - priv-screenTopY[i] = dixScreenOrigins[i].y; - priv-screenBottomX[i] = dixScreenOrigins[i].x; - priv-screenBottomY[i] = dixScreenOrigins[i].y; + priv-screenTopX[i] = screenInfo.screens[i]-x; + priv-screenTopY[i] = screenInfo.screens[i]-y; + priv-screenBottomX[i] = screenInfo.screens[i]-x; + priv-screenBottomY[i] = screenInfo.screens[i]-y; DBG(10, priv, from dix: ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n, -- 1.6.0.4 Found due to compile error. Please check as I cannot do a live test. This isn't quite as easy. Adding this patch means that the driver won't build against earlier versions of the server anymore because x/y are missing from the ScreenRec. Thanks to the video ABI not being bumped after/with this change, there is no easy way around this, afaict. Should that not be considered a bug in the server? If so, there should still be time to bump the ABI or whatever has to be done. RC1 was released yesterday I think. This type of change must be breaking some rule in the server development process or there is a big hole in it. Cheers, Peter signature.asc Description: This is a digitally signed message part -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH] dixScreenOrigins has been removed from server
On 16/06/2010, at 22:07 , Gaetan Nadon wrote: On Wed, 2010-06-16 at 13:53 +1000, Peter Hutterer wrote: On Tue, Jun 15, 2010 at 09:54:41PM -0400, Gaetan Nadon wrote: Since commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 Fields x and y have been added to ScreenRec. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- src/wcmCommon.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 4a70195..9370744 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1791,10 +1791,10 @@ void wcmInitialScreens(LocalDevicePtr local) { if (screenInfo.numScreens 1) { - priv-screenTopX[i] = dixScreenOrigins[i].x; - priv-screenTopY[i] = dixScreenOrigins[i].y; - priv-screenBottomX[i] = dixScreenOrigins[i].x; - priv-screenBottomY[i] = dixScreenOrigins[i].y; + priv-screenTopX[i] = screenInfo.screens[i]-x; + priv-screenTopY[i] = screenInfo.screens[i]-y; + priv-screenBottomX[i] = screenInfo.screens[i]-x; + priv-screenBottomY[i] = screenInfo.screens[i]-y; DBG(10, priv, from dix: ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n, -- 1.6.0.4 Found due to compile error. Please check as I cannot do a live test. This isn't quite as easy. Adding this patch means that the driver won't build against earlier versions of the server anymore because x/y are missing from the ScreenRec. Thanks to the video ABI not being bumped after/with this change, there is no easy way around this, afaict. Should that not be considered a bug in the server? If so, there should still be time to bump the ABI or whatever has to be done. RC1 was released yesterday I think. This type of change must be breaking some rule in the server development process or there is a big hole in it. yes and no, there's some disagreement. Keith generally thinks that bumping the ABI once per cycle is enough. For the input API, I've asked him to bump multiple times if needed to avoid this situation. This one I picked up quite late because I was busy with the 1.8 branch and only realized a while later. I'm not happy about it but afaict the wacom driver is the only affected driver - at least I haven't heard anyone else complain yet. We could probably still bump the ABI but right now I'm wondering if we even need the information in the driver. From my current tests, ripping out all multi-screen stuff provides better results than the current code. Cheers, Peter -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH] dixScreenOrigins has been removed from server
On Wed, Jun 16, 2010 at 6:13 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On 16/06/2010, at 22:07 , Gaetan Nadon wrote: On Wed, 2010-06-16 at 13:53 +1000, Peter Hutterer wrote: On Tue, Jun 15, 2010 at 09:54:41PM -0400, Gaetan Nadon wrote: Since commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 Fields x and y have been added to ScreenRec. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- src/wcmCommon.c | 8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 4a70195..9370744 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1791,10 +1791,10 @@ void wcmInitialScreens(LocalDevicePtr local) { if (screenInfo.numScreens 1) { - priv-screenTopX[i] = dixScreenOrigins[i].x; - priv-screenTopY[i] = dixScreenOrigins[i].y; - priv-screenBottomX[i] = dixScreenOrigins[i].x; - priv-screenBottomY[i] = dixScreenOrigins[i].y; + priv-screenTopX[i] = screenInfo.screens[i]-x; + priv-screenTopY[i] = screenInfo.screens[i]-y; + priv-screenBottomX[i] = screenInfo.screens[i]-x; + priv-screenBottomY[i] = screenInfo.screens[i]-y; DBG(10, priv, from dix: ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n, -- 1.6.0.4 Found due to compile error. Please check as I cannot do a live test. This isn't quite as easy. Adding this patch means that the driver won't build against earlier versions of the server anymore because x/y are missing from the ScreenRec. Thanks to the video ABI not being bumped after/with this change, there is no easy way around this, afaict. Should that not be considered a bug in the server? If so, there should still be time to bump the ABI or whatever has to be done. RC1 was released yesterday I think. This type of change must be breaking some rule in the server development process or there is a big hole in it. yes and no, there's some disagreement. Keith generally thinks that bumping the ABI once per cycle is enough. For the input API, I've asked him to bump multiple times if needed to avoid this situation. This one I picked up quite late because I was busy with the 1.8 branch and only realized a while later. I'm not happy about it but afaict the wacom driver is the only affected driver - at least I haven't heard anyone else complain yet. We could probably still bump the ABI but right now I'm wondering if we even need the information in the driver. From my current tests, ripping out all multi-screen stuff provides better results than the current code. Was the testing based on the current X server or was it also on the older servers (X servers 1.7 and later)? Which multi-monitor setups have been tested? There might be X server versions or multi-monitor setups that need those lines, although I do hope we have a clean solution to cover them all. Ping -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH] dixScreenOrigins has been removed from server
On Wed, Jun 16, 2010 at 09:25:39AM -0700, Ping Cheng wrote: On Wed, Jun 16, 2010 at 6:13 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On 16/06/2010, at 22:07 , Gaetan Nadon wrote: On Wed, 2010-06-16 at 13:53 +1000, Peter Hutterer wrote: On Tue, Jun 15, 2010 at 09:54:41PM -0400, Gaetan Nadon wrote: Since commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 Fields x and y have been added to ScreenRec. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- src/wcmCommon.c | 8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 4a70195..9370744 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1791,10 +1791,10 @@ void wcmInitialScreens(LocalDevicePtr local) { if (screenInfo.numScreens 1) { - priv-screenTopX[i] = dixScreenOrigins[i].x; - priv-screenTopY[i] = dixScreenOrigins[i].y; - priv-screenBottomX[i] = dixScreenOrigins[i].x; - priv-screenBottomY[i] = dixScreenOrigins[i].y; + priv-screenTopX[i] = screenInfo.screens[i]-x; + priv-screenTopY[i] = screenInfo.screens[i]-y; + priv-screenBottomX[i] = screenInfo.screens[i]-x; + priv-screenBottomY[i] = screenInfo.screens[i]-y; DBG(10, priv, from dix: ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n, -- 1.6.0.4 Found due to compile error. Please check as I cannot do a live test. This isn't quite as easy. Adding this patch means that the driver won't build against earlier versions of the server anymore because x/y are missing from the ScreenRec. Thanks to the video ABI not being bumped after/with this change, there is no easy way around this, afaict. Should that not be considered a bug in the server? If so, there should still be time to bump the ABI or whatever has to be done. RC1 was released yesterday I think. This type of change must be breaking some rule in the server development process or there is a big hole in it. yes and no, there's some disagreement. Keith generally thinks that bumping the ABI once per cycle is enough. For the input API, I've asked him to bump multiple times if needed to avoid this situation. This one I picked up quite late because I was busy with the 1.8 branch and only realized a while later. I'm not happy about it but afaict the wacom driver is the only affected driver - at least I haven't heard anyone else complain yet. We could probably still bump the ABI but right now I'm wondering if we even need the information in the driver. From my current tests, ripping out all multi-screen stuff provides better results than the current code. Was the testing based on the current X server or was it also on the older servers (X servers 1.7 and later)? Which multi-monitor setups have been tested? I have a permanent RandR 1.2 multihead setup (laptop + external screen) that's alternatively running 1.7, 1.8 and git master. That works fine, since the whole area exposed is a single coordinate range. with the 3x3 input transformation matrix in git master, I can bind the tablet onto any screen region now too. I have a second setup that I think is a 1.8 server with two graphics cards and thus two protocol screens (screenInfo.numScreens == 2). That's the one that's mostly broken right now. I believe TwinView would have the same issue, since it appears as two separate screens to the server. Cheers, Peter There might be X server versions or multi-monitor setups that need those lines, although I do hope we have a clean solution to cover them all. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH] dixScreenOrigins has been removed from server
On Wed, Jun 16, 2010 at 3:26 PM, Peter Hutterer peter.hutte...@who-t.net wrote: We could probably still bump the ABI but right now I'm wondering if we even need the information in the driver. From my current tests, ripping out all multi-screen stuff provides better results than the current code. Was the testing based on the current X server or was it also on the older servers (X servers 1.7 and later)? Which multi-monitor setups have been tested? I have a permanent RandR 1.2 multihead setup (laptop + external screen) that's alternatively running 1.7, 1.8 and git master. That works fine, since the whole area exposed is a single coordinate range. with the 3x3 input transformation matrix in git master, I can bind the tablet onto any screen region now too. So, RandR setting is fine without the screenInfo. But, I have a second setup that I think is a 1.8 server with two graphics cards and thus two protocol screens (screenInfo.numScreens == 2). That's the one that's mostly broken right now. I feel we'll need the screenInfo for Xinerama setup. I believe TwinView would have the same issue, since it appears as two separate screens to the server. Normal TwinView setup can probably go with RandR since it treats the whole desktop like one screen. However, that is for the normal case. There are unusual TwinView cases which work like a Xinerama setup. If you can make the pure RandR and Xinerama work, I'll take care of the TwinView stuff. Ping -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
[Linuxwacom-devel] [PATCH 3/8] Move numScreen initialization into option parsing.
Let's not hide it somewhere else, parse and set all options and defaults in one place. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/wcmCommon.c |2 -- src/wcmValidateDevice.c |5 + src/xf86Wacom.c |3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 4a70195..7f4a28a 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1669,8 +1669,6 @@ static void wcmInitialTVScreens(LocalDevicePtr local) if (priv-twinview == TV_NONE) return; - priv-numScreen = 2; - if ((priv-twinview == TV_LEFT_RIGHT) || (priv-twinview == TV_RIGHT_LEFT)) { /* it does not need the offset if always map to a specific screen */ diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c index 9588637..e90bc21 100644 --- a/src/wcmValidateDevice.c +++ b/src/wcmValidateDevice.c @@ -734,6 +734,11 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged) priv-twinview = TV_NONE; } + if (s priv-twinview != TV_NONE) + priv-numScreen = 2; + else + priv-numScreen = screenInfo.numScreens; + return 1; error: free(area); diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c index 9a071e7..a518b62 100644 --- a/src/xf86Wacom.c +++ b/src/xf86Wacom.c @@ -144,9 +144,6 @@ static int wcmInitArea(LocalDevicePtr local) area-bottomX = priv-bottomX; area-bottomY = priv-bottomY; - if (priv-twinview != TV_NONE) - priv-numScreen = 2; - if (priv-screen_no != -1 (priv-screen_no = priv-numScreen || priv-screen_no 0)) { -- 1.7.0.1 -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
[Linuxwacom-devel] [PATCH 4/8] commonDispatchDevice: return early if no device was found.
This patch has no functional changes, it simply reduces by one indentation level. Instead of if (pDev) { huge amount of code } return; It now does: if (!pDev) return; huge amount of code Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/wcmCommon.c | 313 +++ 1 files changed, 156 insertions(+), 157 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 7f4a28a..0c82324 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1263,6 +1263,8 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, WacomToolPtr tooldef = NULL; WacomDeviceState* ds = pChannel-valid.states[0]; WacomDevicePtr priv = NULL; + WacomDeviceState filtered; + int button; if (!ds-device_type ds-proximity) { @@ -1383,202 +1385,199 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, /* if a device matched criteria, handle filtering per device * settings, and send event to XInput */ - if (pDev) + if (!pDev) { - WacomDeviceState filtered = pChannel-valid.state; + DBG(11, common, no device matches with +id=%d, serial=%u\n, + ds-device_type, ds-serial_num); + return; + } - /* Device transformations come first */ - /* button 1 Threshold test */ - int button = 1; - priv = pDev-private; + filtered = pChannel-valid.state; - if (common-wcmDevCls == gWacomUSBDevice IsTouch(priv) !ds-proximity) - { - priv-hardProx = 0; - } + /* Device transformations come first */ + /* button 1 Threshold test */ + button = 1; + priv = pDev-private; - if (common-wcmDevCls == gWacomUSBDevice (IsStylus(priv) || IsEraser(priv))) - { - priv-hardProx = 1; - } - - /* send a touch out for USB Tablet PCs */ - if (common-wcmDevCls == gWacomUSBDevice !IsTouch(priv) + if (common-wcmDevCls == gWacomUSBDevice IsTouch(priv) !ds-proximity) + { + priv-hardProx = 0; + } + + if (common-wcmDevCls == gWacomUSBDevice (IsStylus(priv) || IsEraser(priv))) + { + priv-hardProx = 1; + } + + /* send a touch out for USB Tablet PCs */ + if (common-wcmDevCls == gWacomUSBDevice !IsTouch(priv) common-wcmTouchDefault !priv-oldProximity) - { - LocalDevicePtr localDevices = xf86FirstLocalDevice(); - WacomCommonPtr tempcommon = NULL; - WacomDevicePtr temppriv = NULL; + { + LocalDevicePtr localDevices = xf86FirstLocalDevice(); + WacomCommonPtr tempcommon = NULL; + WacomDevicePtr temppriv = NULL; - /* Lookup to see if associated touch was enabled */ - for (; localDevices != NULL; localDevices = localDevices-next) + /* Lookup to see if associated touch was enabled */ + for (; localDevices != NULL; localDevices = localDevices-next) + { + if (strstr(localDevices-drv-driverName, wacom)) { - if (strstr(localDevices-drv-driverName, wacom)) - { - temppriv = (WacomDevicePtr) localDevices-private; - tempcommon = temppriv-common; + temppriv = (WacomDevicePtr) localDevices-private; + tempcommon = temppriv-common; - if ((tempcommon-tablet_id == common-tablet_id) + if ((tempcommon-tablet_id == common-tablet_id) IsTouch(temppriv) temppriv-oldProximity) - { - /* Send soft prox-out for touch first */ - wcmSoftOutEvent(localDevices); - } + { + /* Send soft prox-out for touch first */ + wcmSoftOutEvent(localDevices); } } } + } - if (IsStylus(priv) || IsEraser(priv)) - { - /* Instead of reporting the raw pressure, we normalize -* the pressure from 0 to FILTER_PRESSURE_RES.
[Linuxwacom-devel] [PATCH 1/8] Don't reconfigure the axes when switching mode.
Run-time axis configuration is not really allowed. The XI2 protocol permits it but it's forbidden for XI1 clients since they have no notification mechanisms. And we don't have any server APIs for the XI2 stuff yet. If a client issues ListInputDevices and the driver reconfigures _after_ that, the client assumes wrong coordinate ranges, causing possible scaling issues. The right way to handle axis reconfiguration is to scale _inside_ the driver only. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/wcmXCommand.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c index 7a69f60..f0ea99e 100644 --- a/src/wcmXCommand.c +++ b/src/wcmXCommand.c @@ -40,17 +40,9 @@ int wcmDevSwitchModeCall(LocalDevicePtr local, int mode) return (mode == Relative) ? Success : XI_BadMode; if ((mode == Absolute) !is_absolute(local)) - { set_absolute(local, TRUE); - wcmInitialCoordinates(local, 0); - wcmInitialCoordinates(local, 1); - } else if ((mode == Relative) is_absolute(local)) - { set_absolute(local, FALSE); - wcmInitialCoordinates(local, 0); - wcmInitialCoordinates(local, 1); - } else if ( (mode != Absolute) (mode != Relative)) { DBG(10, priv, invalid mode=%d\n, mode); -- 1.7.0.1 -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel