mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
[project @ 2004-05-06 22:24:37 by rjw]
Background redraw bug fix. svn path=/import/netsurf/; revision=838
This commit is contained in:
parent
255bf8f1ed
commit
fac94deeb8
@ -14,6 +14,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "oslib/colourtrans.h"
|
||||
#include "oslib/osspriteop.h"
|
||||
#include "oslib/wimp.h"
|
||||
#include "oslib/wimpspriteop.h"
|
||||
@ -196,18 +197,31 @@ void gui_window_redraw_window(gui_window* g)
|
||||
}
|
||||
|
||||
|
||||
void ro_gui_window_redraw(gui_window* g, wimp_draw* redraw)
|
||||
{
|
||||
void ro_gui_window_redraw(gui_window* g, wimp_draw* redraw) {
|
||||
osbool more;
|
||||
osbool clear_background = false;
|
||||
struct content *c = g->data.browser.bw->current_content;
|
||||
unsigned long background_colour = 0xffffff;
|
||||
|
||||
if (g->type == GUI_BROWSER_WINDOW && c != NULL) {
|
||||
|
||||
/* We should clear the background for GIFs and PNGs
|
||||
*/
|
||||
if ((c->type != CONTENT_HTML) &&
|
||||
(c->type != CONTENT_TEXTPLAIN)) {
|
||||
clear_background = true;
|
||||
}
|
||||
|
||||
if (g->type == GUI_BROWSER_WINDOW && c != NULL)
|
||||
{
|
||||
more = wimp_redraw_window(redraw);
|
||||
wimp_set_font_colours(wimp_COLOUR_WHITE, wimp_COLOUR_BLACK);
|
||||
|
||||
while (more)
|
||||
{
|
||||
while (more) {
|
||||
if (clear_background) {
|
||||
colourtrans_set_gcol(background_colour << 8,
|
||||
colourtrans_SET_BG | colourtrans_USE_ECFS,
|
||||
os_ACTION_OVERWRITE, 0);
|
||||
os_clg();
|
||||
}
|
||||
content_redraw(c,
|
||||
(int) redraw->box.x0 - (int) redraw->xscroll,
|
||||
(int) redraw->box.y1 - (int) redraw->yscroll,
|
||||
@ -217,13 +231,18 @@ void ro_gui_window_redraw(gui_window* g, wimp_draw* redraw)
|
||||
g->scale);
|
||||
more = wimp_get_rectangle(redraw);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
more = wimp_redraw_window(redraw);
|
||||
while (more)
|
||||
while (more) {
|
||||
if (g->type == GUI_BROWSER_WINDOW && c == NULL) {
|
||||
colourtrans_set_gcol(background_colour << 8,
|
||||
colourtrans_SET_BG | colourtrans_USE_ECFS,
|
||||
os_ACTION_OVERWRITE, 0);
|
||||
os_clg();
|
||||
}
|
||||
more = wimp_get_rectangle(redraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -263,6 +282,7 @@ void gui_window_update_box(gui_window *g, const union content_msg_data *data)
|
||||
update.clip.x1 - 1, update.clip.y1 - 1,
|
||||
g->scale);
|
||||
} else {
|
||||
|
||||
assert(data->redraw.object);
|
||||
content_redraw(data->redraw.object,
|
||||
update.box.x0 - update.xscroll +
|
||||
|
Loading…
Reference in New Issue
Block a user