1706f2543Smrg/************************************************************ 2706f2543SmrgCopyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 3706f2543Smrg 4706f2543SmrgPermission to use, copy, modify, and distribute this 5706f2543Smrgsoftware and its documentation for any purpose and without 6706f2543Smrgfee is hereby granted, provided that the above copyright 7706f2543Smrgnotice appear in all copies and that both that copyright 8706f2543Smrgnotice and this permission notice appear in supporting 9706f2543Smrgdocumentation, and that the name of Silicon Graphics not be 10706f2543Smrgused in advertising or publicity pertaining to distribution 11706f2543Smrgof the software without specific prior written permission. 12706f2543SmrgSilicon Graphics makes no representation about the suitability 13706f2543Smrgof this software for any purpose. It is provided "as is" 14706f2543Smrgwithout any express or implied warranty. 15706f2543Smrg 16706f2543SmrgSILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 17706f2543SmrgSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 18706f2543SmrgAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 19706f2543SmrgGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 20706f2543SmrgDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21706f2543SmrgDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 22706f2543SmrgOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 23706f2543SmrgTHE USE OR PERFORMANCE OF THIS SOFTWARE. 24706f2543Smrg 25706f2543Smrg********************************************************/ 26706f2543Smrg 27706f2543Smrg#ifdef HAVE_DIX_CONFIG_H 28706f2543Smrg#include <dix-config.h> 29706f2543Smrg#endif 30706f2543Smrg 31706f2543Smrg#include <stdio.h> 32706f2543Smrg#include <X11/X.h> 33706f2543Smrg#include <X11/Xproto.h> 34706f2543Smrg#include <X11/keysym.h> 35706f2543Smrg#include "inputstr.h" 36706f2543Smrg#include "scrnintstr.h" 37706f2543Smrg#include "windowstr.h" 38706f2543Smrg#include <xkbsrv.h> 39706f2543Smrg#include <X11/extensions/XI.h> 40706f2543Smrg 41706f2543Smrgstatic void 42706f2543SmrgXkbDDXUpdateIndicators(DeviceIntPtr dev,CARD32 new) 43706f2543Smrg{ 44706f2543Smrg dev->kbdfeed->ctrl.leds= new; 45706f2543Smrg (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl); 46706f2543Smrg return; 47706f2543Smrg} 48706f2543Smrg 49706f2543Smrgvoid 50706f2543SmrgXkbDDXUpdateDeviceIndicators( DeviceIntPtr dev, 51706f2543Smrg XkbSrvLedInfoPtr sli, 52706f2543Smrg CARD32 new) 53706f2543Smrg{ 54706f2543Smrg if (sli->fb.kf==dev->kbdfeed) 55706f2543Smrg XkbDDXUpdateIndicators(dev,new); 56706f2543Smrg else if (sli->class==KbdFeedbackClass) { 57706f2543Smrg KbdFeedbackPtr kf; 58706f2543Smrg kf= sli->fb.kf; 59706f2543Smrg if (kf && kf->CtrlProc) { 60706f2543Smrg (*kf->CtrlProc)(dev,&kf->ctrl); 61706f2543Smrg } 62706f2543Smrg } 63706f2543Smrg else if (sli->class==LedFeedbackClass) { 64706f2543Smrg LedFeedbackPtr lf; 65706f2543Smrg lf= sli->fb.lf; 66706f2543Smrg if (lf && lf->CtrlProc) { 67706f2543Smrg (*lf->CtrlProc)(dev,&lf->ctrl); 68706f2543Smrg } 69706f2543Smrg } 70706f2543Smrg return; 71706f2543Smrg} 72