summaryrefslogtreecommitdiffstats
path: root/generic/tkGrab.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-31 14:39:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-31 14:39:04 (GMT)
commit57697b5b22a5851bca41ba3ec058f1de355ba5dc (patch)
tree6faf126294b1235b3307dcc394cab895489ceef6 /generic/tkGrab.c
parentd4a4017589dd52fa8e9667df9d754fd62abd6bed (diff)
downloadtk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.zip
tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.gz
tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.bz2
minor improvements to flag handling
Diffstat (limited to 'generic/tkGrab.c')
-rw-r--r--generic/tkGrab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkGrab.c b/generic/tkGrab.c
index 6a5fac6..2df5552 100644
--- a/generic/tkGrab.c
+++ b/generic/tkGrab.c
@@ -447,7 +447,7 @@ Tk_Grab(
dispPtr->grabFlags &= ~(GRAB_GLOBAL|GRAB_TEMP_GLOBAL);
XQueryPointer(dispPtr->display, winPtr->window, &dummy1,
&dummy2, &dummy3, &dummy4, &dummy5, &dummy6, &state);
- if ((state & ALL_BUTTONS) != 0) {
+ if (state & ALL_BUTTONS) {
dispPtr->grabFlags |= GRAB_TEMP_GLOBAL;
goto setGlobalGrab;
}
@@ -859,7 +859,7 @@ TkPointerEvent(
}
}
if (eventPtr->type == ButtonPress) {
- if ((eventPtr->xbutton.state & ALL_BUTTONS) == 0) {
+ if (!(eventPtr->xbutton.state & ALL_BUTTONS)) {
if (outsideGrabTree) {
TkChangeEventWindow(eventPtr, dispPtr->grabWinPtr);
Tk_QueueWindowEvent(eventPtr, TCL_QUEUE_HEAD);