File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -328,9 +328,6 @@ pub const Window = struct {
328328 } else {
329329 self .menu_item_callbacks .clearAndFree ();
330330 }
331-
332- // Ensure menu item callbacks can be accessed during event processing.
333- getEventUserData (self .hwnd ).classUserdata = @intFromPtr (self );
334331 }
335332
336333 pub fn setSourceDpi (self : * Window , dpi : u32 ) void {
@@ -402,7 +399,7 @@ pub fn Events(comptime T: type) type {
402399 // For menubar item events, HIWORD(wp) and lp are set to 0.
403400 else if (code == 0 ) {
404401 const data = getEventUserData (hwnd );
405- const window_ptr : ? * Window = @ptrFromInt ( data .classUserdata );
402+ const window_ptr : ? * Window = @ptrCast ( @alignCast ( data .peerPtr ) );
406403 const id : u16 = @intCast (wp & 0xFFFF );
407404
408405 if (window_ptr ) | window | {
You can’t perform that action at this time.
0 commit comments