diff options
author | Ole Loots <ole@monochrom.net> | 2013-01-16 03:21:35 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2013-01-16 03:21:35 +0100 |
commit | 4f0ae4e12868ddf26e7018e0a3dec4badaa1b1b6 (patch) | |
tree | 4e9c63a447215553179dd4fe89e5c1cc7788442b /atari/plot/plot.c | |
parent | 6a32f94cc22f26afa43bfb58688688ae704e5514 (diff) | |
download | netsurf-4f0ae4e12868ddf26e7018e0a3dec4badaa1b1b6.tar.gz netsurf-4f0ae4e12868ddf26e7018e0a3dec4badaa1b1b6.tar.bz2 |
Search form inside browser windows starts to work.
Diffstat (limited to 'atari/plot/plot.c')
-rwxr-xr-x | atari/plot/plot.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/atari/plot/plot.c b/atari/plot/plot.c index 71382db2b..eb44e47b8 100755 --- a/atari/plot/plot.c +++ b/atari/plot/plot.c @@ -1685,6 +1685,7 @@ bool plot_unlock(void) wind_update(END_MCTRL); wind_update(END_UPDATE); graf_mouse(M_ON, NULL); + vs_clip_off(atari_plot_vdi_handle); atari_plot_flags &= ~PLOT_FLAG_LOCKED; return(false); } @@ -1906,10 +1907,10 @@ bool plot_clip(const struct rect *clip) plot_get_dimensions(&canvas); - view.clipping.x0 = clip->x0; view.clipping.y0 = clip->y0; - view.clipping.x1 = clip->x1; view.clipping.y1 = clip->y1; + view.clipping.x0 = clip->x0; + view.clipping.x1 = clip->x1; plot_get_clip_grect(&gclip); @@ -1918,9 +1919,18 @@ bool plot_clip(const struct rect *clip) rc_intersect(&canvas, &gclip); - //dbg_grect("canvas clipped: ", &gclip); + if(gclip.g_h < 0){ + gclip.g_h = 0; + } - assert(rc_intersect(&screen, &gclip)); + if (!rc_intersect(&screen, &gclip)) { + dbg_rect("cliprect: ", &view.clipping); + dbg_grect("screen: ", &canvas); + dbg_grect("canvas clipped: ", &gclip); + //assert(1 == 0); + } + + //assert(rc_intersect(&screen, &gclip)); //dbg_grect("canvas clipped to screen", &gclip); @@ -1947,7 +1957,9 @@ bool plot_get_clip(struct rect * out) void plot_get_clip_grect(GRECT * out) { struct rect clip={0,0,0,0}; + plot_get_clip(&clip); + out->g_x = clip.x0; out->g_y = clip.y0; out->g_w = clip.x1 - clip.x0; |