# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1618439921 0 # Node ID cfb14192753cd307d16dbf35826f54e0c3305977 # Parent 79732eb2deef77875d3c1e84b664ce6fdc9e2110 Mac: Fill in the row data in the second data pointer slot instead of leaving it NULL. Not sure why I didn't do this earlier. diff -r 79732eb2deef -r cfb14192753c mac/dw.m --- a/mac/dw.m Wed Apr 14 21:36:45 2021 +0000 +++ b/mac/dw.m Wed Apr 14 22:38:41 2021 +0000 @@ -702,7 +702,7 @@ case 10: { int (* API containercontextfunc)(HWND, char *, int, int, void *, void *) = (int (* API)(HWND, char *, int, int, void *, void *))handler->signalfunction; - char *text = (char *)event; + char *text = NULL; void *user = NULL; LONG x,y; @@ -718,6 +718,13 @@ user = [value pointerValue]; } } + else + { + void **params = (void **)event; + + text = params[0]; + user = params[1]; + } dw_pointer_query_pos(&x, &y); @@ -3044,10 +3051,14 @@ } -(NSMenu *)menuForEvent:(NSEvent *)event { - int row; NSPoint where = [self convertPoint:[event locationInWindow] fromView:nil]; - row = (int)[self rowAtPoint:where]; - _dw_event_handler(self, (NSEvent *)[self getRowTitle:row], 10); + int row = (int)[self rowAtPoint:where]; + void *params[2]; + + params[0] = [self getRowTitle:row]; + params[1] = [self getRowData:row]; + + _dw_event_handler(self, (NSEvent *)params, 10); return nil; } -(void)keyDown:(NSEvent *)theEvent