Improved the exited debugging.

This commit is contained in:
Pietro Gagliardi 2015-12-27 17:13:57 -05:00
parent 93a9847b59
commit 66ad8066ea
2 changed files with 5 additions and 2 deletions

View File

@ -223,22 +223,24 @@ mouseEvent(otherMouseUp)
{
uiArea *a = self->libui_a;
NSLog(@"entered");
NSLog(@"entered %p", self);
NSLog(@"a %p", a);
NSLog(@"ah %p", a->ah);
NSLog(@"crossed %p", a->ah->MouseCrossed);
(*(a->ah->MouseCrossed))(a->ah, a, 0);
NSLog(@"after entered call");
}
- (void)mouseExited:(NSEvent *)e
{
uiArea *a = self->libui_a;
NSLog(@"exited");
NSLog(@"exited %p", self);
NSLog(@"a %p", a);
NSLog(@"ah %p", a->ah);
NSLog(@"crossed %p", a->ah->MouseCrossed);
(*(a->ah->MouseCrossed))(a->ah, a, 1);
NSLog(@"after exited call");
}
// note: there is no equivalent to WM_CAPTURECHANGED on Mac OS X; there literally is no way to break a grab like that

View File

@ -27,6 +27,7 @@ static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMouseEvent *
static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
{
printf("%d %d\n", left, !left);
uiCheckboxSetChecked(label, !left);
}