summaryrefslogtreecommitdiff
path: root/atari/gui.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-11-28 21:30:24 +0100
committerOle Loots <ole@monochrom.net>2012-11-28 21:30:24 +0100
commitff7cf937629933e782eb8103dadb8b5f27f14a4d (patch)
treeb4067d388769f26d95e032437b1cb518de5ed09e /atari/gui.c
parentfe0e2508e62323955df415b45e2ea9b1b7d6373f (diff)
downloadnetsurf-ff7cf937629933e782eb8103dadb8b5f27f14a4d.tar.gz
netsurf-ff7cf937629933e782eb8103dadb8b5f27f14a4d.tar.bz2
Started refactoring of global redraw handling.
Diffstat (limited to 'atari/gui.c')
-rwxr-xr-xatari/gui.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/atari/gui.c b/atari/gui.c
index 0d85eefea..2528eff1f 100755
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -131,18 +131,22 @@ void gui_poll(bool active)
struct gui_window * g;
- for( g = window_list; g != NULL; g=g->next ) {
- if( browser_redraw_required( g ) ) {
- browser_redraw(g);
- }
- if(g->root->toolbar) {
- //if(g->root->toolbar->url.redraw ) {
- // TODO: implement toolbar redraw mechanism
- //tb_url_redraw( g );
- //}
- }
+ if(input_window->root->redraw_slots.areas_used > 0){
+ window_process_redraws(input_window->root);
}
+// for( g = window_list; g != NULL; g=g->next ) {
+// if( browser_redraw_required( g ) ) {
+// browser_redraw(g);
+// }
+// if(g->root->toolbar) {
+// //if(g->root->toolbar->url.redraw ) {
+// // TODO: implement toolbar redraw mechanism
+// //tb_url_redraw( g );
+// //}
+// }
+// }
+
if( !active ) {
/* this suits for stuff with lower priority */
/* TBD: really be spare on redraws??? */
@@ -179,6 +183,9 @@ void gui_poll(bool active)
}
} while ( gui_poll_repeat && !(active||rendering));
+ if(input_window->root->redraw_slots.areas_used > 0){
+ window_process_redraws(input_window->root);
+ }
}
@@ -313,6 +320,7 @@ void gui_window_set_title(struct gui_window *gw, const char *title)
gw->title = realloc(gw->title, l);
strncpy(gw->title, title, l);
}
+ gw->title[l] = 0;
if(input_window == gw)
window_set_title(gw->root, gw->title);
}
@@ -336,7 +344,7 @@ void gui_window_set_status(struct gui_window *w, const char *text)
w->status = realloc(w->status, l);
strncpy(w->status, text, l);
- w->status[l-1] = 0;
+ w->status[l] = 0;
if(input_window == w)
window_set_stauts(w->root, (char*)text);
@@ -534,7 +542,7 @@ void gui_window_set_url(struct gui_window *w, const char *url)
w->url = realloc(w->url, l);
}
strncpy(w->url, url, l);
-
+ w->url[l] = 0;
if(input_window == w->root->active_gui_window){
toolbar_set_url(w->root->toolbar, url);
}