Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/98f94c4bf39db60b0b686bccc84175e15214b348
...commit
http://git.netsurf-browser.org/netsurf.git/commit/98f94c4bf39db60b0b686bccc84175e15214b348
...tree
http://git.netsurf-browser.org/netsurf.git/tree/98f94c4bf39db60b0b686bccc84175e15214b348
The branch, chris/amiga-corewindow has been updated
via 98f94c4bf39db60b0b686bccc84175e15214b348 (commit)
via e7c9b863b3d2dd8579cb2c9f80f4a20933d04315 (commit)
from a9cc0792a43d108e5ff61055354422a6c7218a74 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=98f94c4bf39db60b0b686bccc84175e15214b348
commit 98f94c4bf39db60b0b686bccc84175e15214b348
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
move mousemove back to the event loop and ensure the window is created
cleared
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c
index 49629d6..509499f 100644
--- a/frontends/amiga/corewindow.c
+++ b/frontends/amiga/corewindow.c
@@ -83,22 +83,40 @@ ami_cw_coord_amiga_to_ns(struct ami_corewindow *ami_cw, int
*restrict x, int *re
/* get current mouse position in the draw area, adjusted for scroll.
- * only works during OM_NOTIFY! at other times use last stored posn
+ * @return true if the mouse was in the draw area and co-ordinates updated
*/
-static void
+static bool
ami_cw_mouse_pos(struct ami_corewindow *ami_cw, int *restrict x, int *restrict
y)
{
- ULONG xm, ym;
+ int16 xm, ym;
+ ULONG xs, ys;
+ struct IBox *bbox;
- GetAttr(SPACE_MouseX, ami_cw->objects[GID_CW_DRAW], (ULONG *)&xm);
- GetAttr(SPACE_MouseY, ami_cw->objects[GID_CW_DRAW], (ULONG *)&ym);
+ xm = ami_cw->win->MouseX;
+ ym = ami_cw->win->MouseY;
- ami_cw_coord_amiga_to_ns(ami_cw, (int *)&xm, (int *)&ym);
+ if(ami_gui_get_space_box((Object *)ami_cw->objects[GID_CW_DRAW], &bbox)
!= NSERROR_OK) {
+ amiga_warn_user("NoMemory", "");
+ return false;
+ }
+
+ xm -= bbox->Left;
+ ym -= bbox->Top;
+
+ ami_gui_free_space_box(bbox);
- ami_cw->mouse_x = xm;
- ami_cw->mouse_y = ym;
- *x = ami_cw->mouse_x;
- *y = ami_cw->mouse_y;
+ if((xm < 0) || (ym < 0) || (xm > bbox->Width) || (ym > bbox->Height))
+ return false;
+
+ GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&xs);
+ GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&ys);
+
+ xm += xs;
+ ym += ys;
+ *x = xm;
+ *y = ym;
+
+ return true;
}
/* handle keypress */
@@ -136,7 +154,6 @@ static void
ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct rect *r)
{
struct IBox *bbox;
- struct RastPort *temprp;
ULONG pos_x, pos_y;
struct rect draw_rect;
int tile_size_x = ami_cw->gg.width;
@@ -315,20 +332,12 @@ HOOKF(void, ami_cw_idcmp_hook, Object *, object, struct
IntuiMessage *)
struct ami_corewindow *ami_cw = hook->h_Data;
struct IntuiWheelData *wheel;
ULONG gid = GetTagData( GA_ID, 0, msg->IAddress );
- int x, y;
- int key_state = 0;
switch(msg->Class)
{
case IDCMP_IDCMPUPDATE:
switch(gid)
{
- case GID_CW_DRAW:
- ami_cw_mouse_pos(ami_cw, &x, &y);
- key_state =
ami_gui_get_quals(ami_cw->objects[GID_CW_WIN]);
- ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
- break;
-
case GID_CW_HSCROLL:
case GID_CW_VSCROLL:
ami_cw_redraw(ami_cw, NULL);
@@ -366,14 +375,21 @@ ami_cw_event(void *w)
int nskey;
int key_state = 0;
struct timeval curtime;
+ int x, y;
while((result = RA_HandleInput(ami_cw->objects[GID_CW_WIN], &code)) !=
WMHI_LASTMSG) {
switch(result & WMHI_CLASSMASK) {
case WMHI_MOUSEMOVE:
- /* in theory the mouse moves we care about are
processed in our hook function... */
+ if(ami_cw_mouse_pos(ami_cw, &x, &y)) {
+ key_state =
ami_gui_get_quals(ami_cw->objects[GID_CW_WIN]);
+ ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
+ }
break;
case WMHI_MOUSEBUTTONS:
+ if(ami_cw_mouse_pos(ami_cw, &x, &y) == false)
+ break;
+
key_state =
ami_gui_get_quals(ami_cw->objects[GID_CW_WIN]);
case SELECTDOWN:
@@ -406,7 +422,7 @@ ami_cw_event(void *w)
}
}
- ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, ami_cw->mouse_x, ami_cw->mouse_y);
+ ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
ami_cw->mouse_state =
BROWSER_MOUSE_HOVER;
break;
@@ -414,11 +430,11 @@ ami_cw_event(void *w)
if(ami_cw->mouse_state &
BROWSER_MOUSE_PRESS_2)
ami_cw->mouse_state =
BROWSER_MOUSE_CLICK_2;
- ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, ami_cw->mouse_x, ami_cw->mouse_y);
+ ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
ami_cw->mouse_state =
BROWSER_MOUSE_HOVER;
break;
- ami_cw->mouse(ami_cw, ami_cw->mouse_state |
key_state, ami_cw->mouse_x, ami_cw->mouse_y);
+ ami_cw->mouse(ami_cw, ami_cw->mouse_state |
key_state, x, y);
break;
case WMHI_RAWKEY:
@@ -641,9 +657,6 @@ nserror ami_corewindow_fini(struct ami_corewindow *ami_cw)
FreeObjList(ami_cw->deferred_rects);
ami_memory_itempool_delete(ami_cw->deferred_rects_pool);
- /* remove the core window from our window list */
- ami_gui_win_list_remove(ami_cw);
-
/* destroy the window */
ami_cw->win = NULL;
DisposeObject(ami_cw->objects[GID_CW_WIN]);
@@ -652,6 +665,9 @@ nserror ami_corewindow_fini(struct ami_corewindow *ami_cw)
ami_plot_release_pens(ami_cw->gg.shared_pens);
ami_free_layers(&ami_cw->gg);
+ /* remove the core window from our window list */
+ ami_gui_win_list_remove(ami_cw);
+
return NSERROR_OK;
}
diff --git a/frontends/amiga/corewindow.h b/frontends/amiga/corewindow.h
index f62987f..2c5dbb5 100644
--- a/frontends/amiga/corewindow.h
+++ b/frontends/amiga/corewindow.h
@@ -52,8 +52,6 @@ struct ami_corewindow {
struct Hook idcmp_hook;
struct timeval lastclick;
- int mouse_x;
- int mouse_y;
int mouse_state;
APTR deferred_rects_pool;
diff --git a/frontends/amiga/sslcert.c b/frontends/amiga/sslcert.c
index df0005e..5d74464 100644
--- a/frontends/amiga/sslcert.c
+++ b/frontends/amiga/sslcert.c
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <proto/intuition.h>
-#include <intuition/icclass.h>
#include <classes/window.h>
#include <gadgets/button.h>
@@ -84,12 +83,11 @@ ami_crtvrfy_destroy(struct ami_crtvrfy_window *crtvrfy_win)
res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
if (res == NSERROR_OK) {
- res = ami_corewindow_fini(&crtvrfy_win->core); /* closes the
window for us */
ami_utf8_free(crtvrfy_win->wintitle);
ami_utf8_free(crtvrfy_win->sslerr);
ami_utf8_free(crtvrfy_win->sslaccept);
ami_utf8_free(crtvrfy_win->sslreject);
- free(crtvrfy_win);
+ res = ami_corewindow_fini(&crtvrfy_win->core); /* closes the
window for us */
}
return res;
}
@@ -250,7 +248,6 @@ ami_crtvrfy_create_window(struct ami_crtvrfy_window
*crtvrfy_win)
SPACE_Transparent, TRUE,
SPACE_BevelStyle, BVS_DISPLAY,
GA_RelVerify, TRUE,
- ICA_TARGET, ICTARGET_IDCMP,
SpaceEnd,
LAYOUT_AddChild, LayoutHObj,
LAYOUT_AddChild,
crtvrfy_win->sslcert_objects[GID_SSLCERT_ACCEPT] = ButtonObj,
@@ -285,7 +282,7 @@ nserror ami_cert_verify(struct nsurl *url,
struct ami_crtvrfy_window *ncwin;
nserror res;
- ncwin = malloc(sizeof(struct ami_crtvrfy_window));
+ ncwin = calloc(1, sizeof(struct ami_crtvrfy_window));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=e7c9b863b3d2dd8579cb2c9f80f4a20933d04315
commit e7c9b863b3d2dd8579cb2c9f80f4a20933d04315
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Take the redraw routine from old tree_redraw with less meddling
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c
index 5aff074..49629d6 100644
--- a/frontends/amiga/corewindow.c
+++ b/frontends/amiga/corewindow.c
@@ -142,6 +142,10 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct
rect *r)
int tile_size_x = ami_cw->gg.width;
int tile_size_y = ami_cw->gg.height;
int tile_x, tile_y, tile_w, tile_h;
+ int x = r->x0;
+ int y = r->y0;
+ int width = r->x1 - r->x0;
+ int height = r->y1 - r->y0;
struct redraw_context ctx = {
.interactive = true,
@@ -154,46 +158,41 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct
rect *r)
return;
}
- int x0 = bbox->Left;
- int y0 = bbox->Top;
- ami_cw_coord_amiga_to_ns(ami_cw, &x0, &y0);
- int x1 = x0 + bbox->Width;
- int y1 = y0 + bbox->Height;
-
- if((r->y1 < y0) || (r->x1 < x0) || (r->x0 > x1) || (r->y0 > y1)) {
- /* rect not visible */
- ami_gui_free_space_box(bbox);
- return;
- }
-
- if(r->y0 < y0) r->y0 = y0;
- if(r->x0 < x0) r->x0 = x0;
- if(r->y1 > y1) r->y1 = y1;
- if(r->x1 > x1) r->x1 = x1;
-
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&pos_x);
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&pos_y);
glob = &ami_cw->gg;
- temprp = glob->rp; //??
- glob->rp = ami_cw->win->RPort;
- for(tile_y = r->y0; tile_y < r->y1; tile_y += tile_size_y) {
+ if(x - pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x);
+ if(y - pos_y + height > bbox->Height) height = bbox->Height - (y -
pos_y);
+
+ if(x < pos_x) {
+ width -= pos_x - x;
+ x = pos_x;
+ }
+
+ if(y < pos_y) {
+ height -= pos_y - y;
+ y = pos_y;
+ }
+
+ for(tile_y = y; tile_y < (y + height); tile_y += tile_size_y) {
tile_h = tile_size_y;
- if((r->y1 - tile_y) < tile_size_y)
- tile_h = r->y1 - tile_y;
+ if(((y + height) - tile_y) < tile_size_y)
+ tile_h = (y + height) - tile_y;
- for(tile_x = r->x0; tile_x < r->x1; tile_x += tile_size_x) {
+ for(tile_x = x; tile_x < (x + width); tile_x += tile_size_x) {
tile_w = tile_size_x;
- if((r->x1 - tile_x) < tile_size_x)
- tile_w = r->x1 - tile_x;
+ if(((x + width) - tile_x) < tile_size_x)
+ tile_w = (x + width) - tile_x;
- draw_rect.x0 = tile_x;
- draw_rect.y0 = tile_y;
+ draw_rect.x0 = - tile_x;
+ draw_rect.y0 = - tile_y;
draw_rect.x1 = tile_x + tile_w;
draw_rect.y1 = tile_y + tile_h;
ami_cw->draw(ami_cw, &draw_rect, &ctx);
+
#ifdef __amigaos4__
BltBitMapTags(BLITA_SrcType, BLITT_BITMAP,
BLITA_Source, ami_cw->gg.bm,
@@ -216,7 +215,6 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct
rect *r)
ami_gui_free_space_box(bbox);
ami_clearclipreg(glob);
- glob->rp = temprp;
ami_gui_set_default_gg();
}
diff --git a/frontends/amiga/sslcert.h b/frontends/amiga/sslcert.h
index 4718e75..392989f 100644
--- a/frontends/amiga/sslcert.h
+++ b/frontends/amiga/sslcert.h
@@ -33,6 +33,6 @@ struct ssl_cert_info;
*/
nserror ami_cert_verify(struct nsurl *url,
const struct ssl_cert_info *certs, unsigned long num,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
+ nserror (*cb)(bool proceed, void *pw), void *cbpw);
#endif
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/corewindow.c | 122 +++++++++++++++++++++++-------------------
frontends/amiga/corewindow.h | 2 -
frontends/amiga/sslcert.c | 7 +--
frontends/amiga/sslcert.h | 2 +-
4 files changed, 71 insertions(+), 62 deletions(-)
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c
index 5aff074..509499f 100644
--- a/frontends/amiga/corewindow.c
+++ b/frontends/amiga/corewindow.c
@@ -83,22 +83,40 @@ ami_cw_coord_amiga_to_ns(struct ami_corewindow *ami_cw, int
*restrict x, int *re
/* get current mouse position in the draw area, adjusted for scroll.
- * only works during OM_NOTIFY! at other times use last stored posn
+ * @return true if the mouse was in the draw area and co-ordinates updated
*/
-static void
+static bool
ami_cw_mouse_pos(struct ami_corewindow *ami_cw, int *restrict x, int *restrict
y)
{
- ULONG xm, ym;
+ int16 xm, ym;
+ ULONG xs, ys;
+ struct IBox *bbox;
+
+ xm = ami_cw->win->MouseX;
+ ym = ami_cw->win->MouseY;
+
+ if(ami_gui_get_space_box((Object *)ami_cw->objects[GID_CW_DRAW], &bbox)
!= NSERROR_OK) {
+ amiga_warn_user("NoMemory", "");
+ return false;
+ }
+
+ xm -= bbox->Left;
+ ym -= bbox->Top;
- GetAttr(SPACE_MouseX, ami_cw->objects[GID_CW_DRAW], (ULONG *)&xm);
- GetAttr(SPACE_MouseY, ami_cw->objects[GID_CW_DRAW], (ULONG *)&ym);
+ ami_gui_free_space_box(bbox);
- ami_cw_coord_amiga_to_ns(ami_cw, (int *)&xm, (int *)&ym);
+ if((xm < 0) || (ym < 0) || (xm > bbox->Width) || (ym > bbox->Height))
+ return false;
- ami_cw->mouse_x = xm;
- ami_cw->mouse_y = ym;
- *x = ami_cw->mouse_x;
- *y = ami_cw->mouse_y;
+ GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&xs);
+ GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&ys);
+
+ xm += xs;
+ ym += ys;
+ *x = xm;
+ *y = ym;
+
+ return true;
}
/* handle keypress */
@@ -136,12 +154,15 @@ static void
ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct rect *r)
{
struct IBox *bbox;
- struct RastPort *temprp;
ULONG pos_x, pos_y;
struct rect draw_rect;
int tile_size_x = ami_cw->gg.width;
int tile_size_y = ami_cw->gg.height;
int tile_x, tile_y, tile_w, tile_h;
+ int x = r->x0;
+ int y = r->y0;
+ int width = r->x1 - r->x0;
+ int height = r->y1 - r->y0;
struct redraw_context ctx = {
.interactive = true,
@@ -154,46 +175,41 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct
rect *r)
return;
}
- int x0 = bbox->Left;
- int y0 = bbox->Top;
- ami_cw_coord_amiga_to_ns(ami_cw, &x0, &y0);
- int x1 = x0 + bbox->Width;
- int y1 = y0 + bbox->Height;
-
- if((r->y1 < y0) || (r->x1 < x0) || (r->x0 > x1) || (r->y0 > y1)) {
- /* rect not visible */
- ami_gui_free_space_box(bbox);
- return;
- }
-
- if(r->y0 < y0) r->y0 = y0;
- if(r->x0 < x0) r->x0 = x0;
- if(r->y1 > y1) r->y1 = y1;
- if(r->x1 > x1) r->x1 = x1;
-
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&pos_x);
GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&pos_y);
glob = &ami_cw->gg;
- temprp = glob->rp; //??
- glob->rp = ami_cw->win->RPort;
- for(tile_y = r->y0; tile_y < r->y1; tile_y += tile_size_y) {
+ if(x - pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x);
+ if(y - pos_y + height > bbox->Height) height = bbox->Height - (y -
pos_y);
+
+ if(x < pos_x) {
+ width -= pos_x - x;
+ x = pos_x;
+ }
+
+ if(y < pos_y) {
+ height -= pos_y - y;
+ y = pos_y;
+ }
+
+ for(tile_y = y; tile_y < (y + height); tile_y += tile_size_y) {
tile_h = tile_size_y;
- if((r->y1 - tile_y) < tile_size_y)
- tile_h = r->y1 - tile_y;
+ if(((y + height) - tile_y) < tile_size_y)
+ tile_h = (y + height) - tile_y;
- for(tile_x = r->x0; tile_x < r->x1; tile_x += tile_size_x) {
+ for(tile_x = x; tile_x < (x + width); tile_x += tile_size_x) {
tile_w = tile_size_x;
- if((r->x1 - tile_x) < tile_size_x)
- tile_w = r->x1 - tile_x;
+ if(((x + width) - tile_x) < tile_size_x)
+ tile_w = (x + width) - tile_x;
- draw_rect.x0 = tile_x;
- draw_rect.y0 = tile_y;
+ draw_rect.x0 = - tile_x;
+ draw_rect.y0 = - tile_y;
draw_rect.x1 = tile_x + tile_w;
draw_rect.y1 = tile_y + tile_h;
ami_cw->draw(ami_cw, &draw_rect, &ctx);
+
#ifdef __amigaos4__
BltBitMapTags(BLITA_SrcType, BLITT_BITMAP,
BLITA_Source, ami_cw->gg.bm,
@@ -216,7 +232,6 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct
rect *r)
ami_gui_free_space_box(bbox);
ami_clearclipreg(glob);
- glob->rp = temprp;
ami_gui_set_default_gg();
}
@@ -317,20 +332,12 @@ HOOKF(void, ami_cw_idcmp_hook, Object *, object, struct
IntuiMessage *)
struct ami_corewindow *ami_cw = hook->h_Data;
struct IntuiWheelData *wheel;
ULONG gid = GetTagData( GA_ID, 0, msg->IAddress );
- int x, y;
- int key_state = 0;
switch(msg->Class)
{
case IDCMP_IDCMPUPDATE:
switch(gid)
{
- case GID_CW_DRAW:
- ami_cw_mouse_pos(ami_cw, &x, &y);
- key_state =
ami_gui_get_quals(ami_cw->objects[GID_CW_WIN]);
- ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
- break;
-
case GID_CW_HSCROLL:
case GID_CW_VSCROLL:
ami_cw_redraw(ami_cw, NULL);
@@ -368,14 +375,21 @@ ami_cw_event(void *w)
int nskey;
int key_state = 0;
struct timeval curtime;
+ int x, y;
while((result = RA_HandleInput(ami_cw->objects[GID_CW_WIN], &code)) !=
WMHI_LASTMSG) {
switch(result & WMHI_CLASSMASK) {
case WMHI_MOUSEMOVE:
- /* in theory the mouse moves we care about are
processed in our hook function... */
+ if(ami_cw_mouse_pos(ami_cw, &x, &y)) {
+ key_state =
ami_gui_get_quals(ami_cw->objects[GID_CW_WIN]);
+ ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
+ }
break;
case WMHI_MOUSEBUTTONS:
+ if(ami_cw_mouse_pos(ami_cw, &x, &y) == false)
+ break;
+
key_state =
ami_gui_get_quals(ami_cw->objects[GID_CW_WIN]);
case SELECTDOWN:
@@ -408,7 +422,7 @@ ami_cw_event(void *w)
}
}
- ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, ami_cw->mouse_x, ami_cw->mouse_y);
+ ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
ami_cw->mouse_state =
BROWSER_MOUSE_HOVER;
break;
@@ -416,11 +430,11 @@ ami_cw_event(void *w)
if(ami_cw->mouse_state &
BROWSER_MOUSE_PRESS_2)
ami_cw->mouse_state =
BROWSER_MOUSE_CLICK_2;
- ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, ami_cw->mouse_x, ami_cw->mouse_y);
+ ami_cw->mouse(ami_cw,
ami_cw->mouse_state | key_state, x, y);
ami_cw->mouse_state =
BROWSER_MOUSE_HOVER;
break;
- ami_cw->mouse(ami_cw, ami_cw->mouse_state |
key_state, ami_cw->mouse_x, ami_cw->mouse_y);
+ ami_cw->mouse(ami_cw, ami_cw->mouse_state |
key_state, x, y);
break;
case WMHI_RAWKEY:
@@ -643,9 +657,6 @@ nserror ami_corewindow_fini(struct ami_corewindow *ami_cw)
FreeObjList(ami_cw->deferred_rects);
ami_memory_itempool_delete(ami_cw->deferred_rects_pool);
- /* remove the core window from our window list */
- ami_gui_win_list_remove(ami_cw);
-
/* destroy the window */
ami_cw->win = NULL;
DisposeObject(ami_cw->objects[GID_CW_WIN]);
@@ -654,6 +665,9 @@ nserror ami_corewindow_fini(struct ami_corewindow *ami_cw)
ami_plot_release_pens(ami_cw->gg.shared_pens);
ami_free_layers(&ami_cw->gg);
+ /* remove the core window from our window list */
+ ami_gui_win_list_remove(ami_cw);
+
return NSERROR_OK;
}
diff --git a/frontends/amiga/corewindow.h b/frontends/amiga/corewindow.h
index f62987f..2c5dbb5 100644
--- a/frontends/amiga/corewindow.h
+++ b/frontends/amiga/corewindow.h
@@ -52,8 +52,6 @@ struct ami_corewindow {
struct Hook idcmp_hook;
struct timeval lastclick;
- int mouse_x;
- int mouse_y;
int mouse_state;
APTR deferred_rects_pool;
diff --git a/frontends/amiga/sslcert.c b/frontends/amiga/sslcert.c
index df0005e..5d74464 100644
--- a/frontends/amiga/sslcert.c
+++ b/frontends/amiga/sslcert.c
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <proto/intuition.h>
-#include <intuition/icclass.h>
#include <classes/window.h>
#include <gadgets/button.h>
@@ -84,12 +83,11 @@ ami_crtvrfy_destroy(struct ami_crtvrfy_window *crtvrfy_win)
res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
if (res == NSERROR_OK) {
- res = ami_corewindow_fini(&crtvrfy_win->core); /* closes the
window for us */
ami_utf8_free(crtvrfy_win->wintitle);
ami_utf8_free(crtvrfy_win->sslerr);
ami_utf8_free(crtvrfy_win->sslaccept);
ami_utf8_free(crtvrfy_win->sslreject);
- free(crtvrfy_win);
+ res = ami_corewindow_fini(&crtvrfy_win->core); /* closes the
window for us */
}
return res;
}
@@ -250,7 +248,6 @@ ami_crtvrfy_create_window(struct ami_crtvrfy_window
*crtvrfy_win)
SPACE_Transparent, TRUE,
SPACE_BevelStyle, BVS_DISPLAY,
GA_RelVerify, TRUE,
- ICA_TARGET, ICTARGET_IDCMP,
SpaceEnd,
LAYOUT_AddChild, LayoutHObj,
LAYOUT_AddChild,
crtvrfy_win->sslcert_objects[GID_SSLCERT_ACCEPT] = ButtonObj,
@@ -285,7 +282,7 @@ nserror ami_cert_verify(struct nsurl *url,
struct ami_crtvrfy_window *ncwin;
nserror res;
- ncwin = malloc(sizeof(struct ami_crtvrfy_window));
+ ncwin = calloc(1, sizeof(struct ami_crtvrfy_window));
if (ncwin == NULL) {
return NSERROR_NOMEM;
}
diff --git a/frontends/amiga/sslcert.h b/frontends/amiga/sslcert.h
index 4718e75..392989f 100644
--- a/frontends/amiga/sslcert.h
+++ b/frontends/amiga/sslcert.h
@@ -33,6 +33,6 @@ struct ssl_cert_info;
*/
nserror ami_cert_verify(struct nsurl *url,
const struct ssl_cert_info *certs, unsigned long num,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
+ nserror (*cb)(bool proceed, void *pw), void *cbpw);
#endif
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org