Pinpointed the issues with mouseExited:. A TODO for now; this is gonna be murder to figure out :)

This commit is contained in:
Pietro Gagliardi 2015-12-27 22:19:59 -05:00
parent 66ad8066ea
commit a1beccd63d
2 changed files with 2 additions and 10 deletions

View File

@ -223,24 +223,14 @@ mouseEvent(otherMouseUp)
{ {
uiArea *a = self->libui_a; uiArea *a = self->libui_a;
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); (*(a->ah->MouseCrossed))(a->ah, a, 0);
NSLog(@"after entered call");
} }
- (void)mouseExited:(NSEvent *)e - (void)mouseExited:(NSEvent *)e
{ {
uiArea *a = self->libui_a; uiArea *a = self->libui_a;
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); (*(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 // 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

@ -75,6 +75,8 @@ void uiCheckboxSetText(uiCheckbox *c, const char *text)
{ {
[c->button setTitle:toNSString(text)]; [c->button setTitle:toNSString(text)];
// this may result in the size of the checkbox changing // this may result in the size of the checkbox changing
// TODO something somewhere is causing this to corrupt some memory so that, for instance, page7b's mouseExited: never triggers on 10.11; figure out what
// TODO is this related to map-related crashes?
uiDarwinControlTriggerRelayout(uiDarwinControl(c)); uiDarwinControlTriggerRelayout(uiDarwinControl(c));
} }