diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-31 14:39:04 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-31 14:39:04 (GMT) |
commit | 57697b5b22a5851bca41ba3ec058f1de355ba5dc (patch) | |
tree | 6faf126294b1235b3307dcc394cab895489ceef6 /generic/tkBind.c | |
parent | d4a4017589dd52fa8e9667df9d754fd62abd6bed (diff) | |
download | tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.zip tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.gz tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.bz2 |
minor improvements to flag handling
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r-- | generic/tkBind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 4029571..7126e24 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -3935,7 +3935,7 @@ ParseEventDescription( eventMask = ButtonPressMask; } else if (eventFlags & KEY) { goto getKeysym; - } else if ((eventFlags & BUTTON) == 0) { + } else if (!(eventFlags & BUTTON)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "specified button \"%s\" for non-button event", field)); @@ -3959,7 +3959,7 @@ ParseEventDescription( if (eventFlags == 0) { patPtr->eventType = KeyPress; eventMask = KeyPressMask; - } else if ((eventFlags & KEY) == 0) { + } else if (!(eventFlags & KEY)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "specified keysym \"%s\" for non-key event", field)); Tcl_SetErrorCode(interp, "TK", "EVENT", "NON_KEY", NULL); @@ -4083,7 +4083,7 @@ GetPatternObj( */ if ((patPtr->eventType == KeyPress) - && ((psPtr->flags & PAT_NEARBY) == 0) + && !(psPtr->flags & PAT_NEARBY) && (patPtr->needMods == 0) && (patPtr->detail.keySym < 128) && isprint(UCHAR(patPtr->detail.keySym)) |