changeset 2533:7c863a3a125f

Android: Pass the cached window handle to the callback so the handles... are as consistent as possible... so we can minimize dw_window_compare() use.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 11 May 2021 05:14:56 +0000
parents 457c91634881
children c4255630cade
files android/dw.cpp
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/android/dw.cpp	Tue May 11 05:00:07 2021 +0000
+++ b/android/dw.cpp	Tue May 11 05:14:56 2021 +0000
@@ -238,7 +238,7 @@
 
                 if(width > 0 && height > 0)
                 {
-                    return sizefunc(object, width, height, handler->data);
+                    return sizefunc(handler->window, width, height, handler->data);
                 }
                 return 0;
             }
@@ -257,20 +257,20 @@
                 int (* API buttonfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction;
                 int button = 1;
 
-                return buttonfunc(object, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), button, handler->data);
+                return buttonfunc(handler->window, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), button, handler->data);
             }
             /* Motion notify event */
             case 5:
             {
                 int (* API motionfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction;
 
-                return motionfunc(object, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), DW_POINTER_TO_INT(params[5]), handler->data);
+                return motionfunc(handler->window, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), DW_POINTER_TO_INT(params[5]), handler->data);
             }
             /* Window close event */
             case 6:
             {
                 int (* API closefunc)(HWND, void *) = (int (* API)(HWND, void *))handler->signalfunction;
-                return closefunc(object, handler->data);
+                return closefunc(handler->window, handler->data);
             }
             /* Window expose/draw event */
             case 7:
@@ -282,7 +282,7 @@
                 exp.y = DW_POINTER_TO_INT(params[4]);
                 exp.width = DW_POINTER_TO_INT(params[5]);
                 exp.height = DW_POINTER_TO_INT(params[6]);
-                int result = exposefunc(object, &exp, handler->data);
+                int result = exposefunc(handler->window, &exp, handler->data);
                 return result;
             }
                 /* Clicked event for buttons and menu items */
@@ -290,7 +290,7 @@
             {
                 int (* API clickfunc)(HWND, void *) = (int (* API)(HWND, void *))handler->signalfunction;
 
-                return clickfunc(object, handler->data);
+                return clickfunc(handler->window, handler->data);
             }
                 /* Container class selection event */
             case 9: