Mercurial > dwindows
changeset 2466:cfb14192753c
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.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 14 Apr 2021 22:38:41 +0000 |
parents | 79732eb2deef |
children | 4d1f370bf65e |
files | mac/dw.m |
diffstat | 1 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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