summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-04-10 19:36:38 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-04-10 19:36:38 +0100
commita938b1a3371f565d2598cf9145af72a2e637474b (patch)
tree57bb9e8fe921e06bb0315057515f6d4d36e8ab88
parentb086d04d8a818412fe86fb66a1c2772972b9b562 (diff)
downloadnetsurf-a938b1a3371f565d2598cf9145af72a2e637474b.tar.gz
netsurf-a938b1a3371f565d2598cf9145af72a2e637474b.tar.bz2
Make "resize with contents" a user option
-rwxr-xr-xamiga/dist/NetSurf.guide2
-rw-r--r--amiga/gui.c6
-rw-r--r--amiga/options.h6
3 files changed, 12 insertions, 2 deletions
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index e38f9f79a..25310bdc1 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -124,6 +124,8 @@ There are a couple of Amiga-specific options which can only be changed directly
@{b}cairo_renderer@{ub} Set rendering engine. -1 = palette-mapped (set automatically when required), 0 = graphics.library (default), 1 = Cairo/graphics.library mixed, 2 = Full Cairo.
@{b}monitor_aspect_x@{ub}/@{b}monitor_aspect_y@{ub} Correct aspect ratio for displays (default of 0 means "assume square pixels").
@{b}screen_compositing@{ub} Use compositing on NetSurf's own screen. 0=disable, 1=enable, 2=default (NB: This is indirectly modified by changing the "simple refresh" option in the GUI)
+@{b}resize_with_contents@{ub} Set to 1 to respect GUI prefs' "resize with contents" option. Default is to use old-style "resize on release"
+@{b}reformat_delay@{ub} Sets a delay on performing content reformats (eg. if the window has been resized). Set to a higher value to make "resize with contents" more responsive. Defaults to 0 (immediate).
@{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0 disables tiling (will use a bitmap at least the size of the screen NetSurf is running on)
@{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size of the web search gadget next to the URL bar.
diff --git a/amiga/gui.c b/amiga/gui.c
index 459ae235e..bbd52bb10 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3058,10 +3058,12 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
char addtab[100],addtab_s[100],addtab_g[100];
char tabthrobber[100];
ULONG refresh_mode = WA_SmartRefresh;
+ ULONG idcmp_sizeverify = IDCMP_SIZEVERIFY;
if (!scrn) ami_openscreenfirst();
if (nsoption_bool(kiosk_mode)) new_tab = false;
+ if (nsoption_bool(resize_with_contents)) idcmp_sizeverify = 0;
bw->scale = 1.0;
if(clone)
@@ -3305,7 +3307,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
WA_SizeBBottom, TRUE,
WA_IDCMP, IDCMP_MENUPICK | IDCMP_MOUSEMOVE |
IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
- IDCMP_RAWKEY | //IDCMP_SIZEVERIFY |
+ IDCMP_RAWKEY | idcmp_sizeverify |
IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
IDCMP_REFRESHWINDOW |
IDCMP_ACTIVEWINDOW | IDCMP_EXTENDEDMOUSE,
@@ -3898,7 +3900,7 @@ static void ami_redraw_callback(void *p)
void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw)
{
int cs = 0;
- if(gwin->bw->reformat_pending) cs = 20;
+ if(gwin->bw->reformat_pending) cs = nsoption_int(reformat_delay);
schedule(cs, ami_redraw_callback, gwin);
if(full_redraw) gwin->redraw_required = true;
}
diff --git a/amiga/options.h b/amiga/options.h
index dc0274da2..f44456a7f 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -80,6 +80,8 @@
int cairo_renderer; \
bool direct_render; \
bool window_simple_refresh; \
+ bool resize_with_contents; \
+ int reformat_delay; \
int redraw_tile_size_x; \
int redraw_tile_size_y; \
int monitor_aspect_x; \
@@ -145,6 +147,8 @@
.cairo_renderer = 0, \
.direct_render = false, \
.window_simple_refresh = false, \
+ .resize_with_contents = false, \
+ .reformat_delay = 0, \
.redraw_tile_size_x = 0, \
.redraw_tile_size_y = 0, \
.monitor_aspect_x = 0, \
@@ -209,6 +213,8 @@
{ "cairo_renderer", OPTION_INTEGER, &nsoptions.cairo_renderer}, \
{ "direct_render", OPTION_BOOL, &nsoptions.direct_render}, \
{ "window_simple_refresh", OPTION_BOOL, &nsoptions.window_simple_refresh}, \
+{ "resize_with_contents", OPTION_BOOL, &nsoptions.resize_with_contents}, \
+{ "reformat_delay", OPTION_INTEGER, &nsoptions.reformat_delay}, \
{ "redraw_tile_size_x", OPTION_INTEGER, &nsoptions.redraw_tile_size_x}, \
{ "redraw_tile_size_y", OPTION_INTEGER, &nsoptions.redraw_tile_size_y}, \
{ "monitor_aspect_x", OPTION_INTEGER, &nsoptions.monitor_aspect_x}, \