summaryrefslogtreecommitdiff
path: root/xkb/xkbPrKeyEv.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkb/xkbPrKeyEv.c')
-rw-r--r--xkb/xkbPrKeyEv.c55
1 files changed, 30 insertions, 25 deletions
diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
index 907cc3ab5..84af5f2f8 100644
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/xkbPrKeyEv.c,v 3.8 2001/01/17 22:37:15 dawes Exp $ */
#include <stdio.h>
#include <math.h>
@@ -53,6 +54,7 @@ KeyClassPtr keyc = keybd->key;
XkbSrvInfoPtr xkbi;
int key;
XkbBehavior behavior;
+unsigned ndx;
xkbi= keyc->xkbInfo;
key= xE->u.u.detail;
@@ -106,34 +108,33 @@ XkbBehavior behavior;
}
break;
case XkbKB_RadioGroup:
- if ( xE->u.u.type == KeyRelease )
- return;
- else {
- unsigned ndx= (behavior.data&(~XkbKB_RGAllowNone));
- if ( ndx<xkbi->nRadioGroups ) {
- XkbRadioGroupPtr rg;
-
- rg = &xkbi->radioGroups[ndx];
- if ( rg->currentDown == xE->u.u.detail ) {
- if (behavior.data&XkbKB_RGAllowNone) {
- xE->u.u.type = KeyRelease;
- XkbHandleActions(keybd,keybd,xE,count);
- rg->currentDown= 0;
- }
- return;
- }
- if ( rg->currentDown!=0 ) {
- int key = xE->u.u.detail;
- xE->u.u.type= KeyRelease;
- xE->u.u.detail= rg->currentDown;
+ ndx= (behavior.data&(~XkbKB_RGAllowNone));
+ if ( ndx<xkbi->nRadioGroups ) {
+ XkbRadioGroupPtr rg;
+
+ if ( xE->u.u.type == KeyRelease )
+ return;
+
+ rg = &xkbi->radioGroups[ndx];
+ if ( rg->currentDown == xE->u.u.detail ) {
+ if (behavior.data&XkbKB_RGAllowNone) {
+ xE->u.u.type = KeyRelease;
XkbHandleActions(keybd,keybd,xE,count);
- xE->u.u.type= KeyPress;
- xE->u.u.detail= key;
- }
- rg->currentDown= key;
+ rg->currentDown= 0;
+ }
+ return;
}
- else ErrorF("InternalError! Illegal radio group %d\n",ndx);
+ if ( rg->currentDown!=0 ) {
+ int key = xE->u.u.detail;
+ xE->u.u.type= KeyRelease;
+ xE->u.u.detail= rg->currentDown;
+ XkbHandleActions(keybd,keybd,xE,count);
+ xE->u.u.type= KeyPress;
+ xE->u.u.detail= key;
+ }
+ rg->currentDown= key;
}
+ else ErrorF("InternalError! Illegal radio group %d\n",ndx);
break;
case XkbKB_Overlay1: case XkbKB_Overlay2:
{
@@ -154,7 +155,11 @@ XkbBehavior behavior;
break;
default:
ErrorF("unknown key behavior 0x%04x\n",behavior.type);
+#if defined(MetroLink)
+ return;
+#else
break;
+#endif
}
}
XkbHandleActions(keybd,keybd,xE,count);