6892799.patch revision 817
817N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
817N/A# Use is subject to license terms.
817N/A#
817N/A# Permission is hereby granted, free of charge, to any person obtaining a
817N/A# copy of this software and associated documentation files (the
817N/A# "Software"), to deal in the Software without restriction, including
817N/A# without limitation the rights to use, copy, modify, merge, publish,
817N/A# distribute, and/or sell copies of the Software, and to permit persons
817N/A# to whom the Software is furnished to do so, provided that the above
817N/A# copyright notice(s) and this permission notice appear in all copies of
817N/A# the Software and that both the above copyright notice(s) and this
817N/A# permission notice appear in supporting documentation.
817N/A#
817N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
817N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
817N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
817N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
817N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
817N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
817N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
817N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
817N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
817N/A#
817N/A# Except as contained in this notice, the name of a copyright holder
817N/A# shall not be used in advertising or otherwise to promote the sale, use
817N/A# or other dealings in this Software without prior written authorization
817N/A# of the copyright holder.
817N/A
817N/Adiff -urp -x '*~' -x '*.orig' src/mouse.c src/mouse.c
817N/A--- src/mouse.c 2009-10-21 15:54:31.146864000 +0800
817N/A+++ src/mouse.c 2009-10-21 15:54:31.343475000 +0800
817N/A@@ -1744,13 +1744,14 @@ MouseProc(DeviceIntPtr device, int what)
817N/A ErrorF("assigning %p atom=%d name=%s\n", device, pInfo->atom,
817N/A pInfo->name);
817N/A #endif
817N/A- break;
817N/A-
817N/A- case DEVICE_ON:
817N/A pInfo->fd = xf86OpenSerial(pInfo->options);
817N/A if (pInfo->fd == -1)
817N/A xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
817N/A- else {
817N/A+
817N/A+ break;
817N/A+
817N/A+ case DEVICE_ON:
817N/A+ if (pInfo->fd != -1) {
817N/A if (pMse->xisbscale)
817N/A pMse->buffer = XisbNew(pInfo->fd, pMse->xisbscale * 4);
817N/A else
817N/A@@ -1800,6 +1801,22 @@ MouseProc(DeviceIntPtr device, int what)
817N/A break;
817N/A
817N/A case DEVICE_OFF:
817N/A+ if (pInfo->fd != -1) {
817N/A+ xf86RemoveEnabledDevice(pInfo);
817N/A+ if (pMse->buffer) {
817N/A+ XisbFree(pMse->buffer);
817N/A+ pMse->buffer = NULL;
817N/A+ }
817N/A+ if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft)
817N/A+ {
817N/A+ RemoveBlockAndWakeupHandlers (MouseBlockHandler,
817N/A+ MouseWakeupHandler,
817N/A+ (pointer) pInfo);
817N/A+ }
817N/A+ }
817N/A+ device->public.on = FALSE;
817N/A+ break;
817N/A+
817N/A case DEVICE_CLOSE:
817N/A if (pInfo->fd != -1) {
817N/A xf86RemoveEnabledDevice(pInfo);