+_motion_mask = 0
+
+def _motion_grab(data):
+ global _motion_mask, _inmove, _inresize;
+
+ if data.action == ob.KeyAction.Release:
+ # have all the modifiers this started with been released?
+ if not _motion_mask & data.state:
+ if _inmove:
+ end_move(data)
+ elif _inresize:
+ end_resize(data)
+ else:
+ raise RuntimeError
+