summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/layout.cc3
-rw-r--r--src/uicmd.cc3
-rw-r--r--src/web.cc4
3 files changed, 9 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index f0470748..c938e525 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -745,7 +745,8 @@ void Layout::setBgImage (style::StyleImage *bgImage,
if (layoutImgRenderer && this->bgImage)
this->bgImage->removeExternalImgRenderer (layoutImgRenderer);
- bgImage->ref ();
+ if (bgImage)
+ bgImage->ref ();
if (this->bgImage)
this->bgImage->unref ();
diff --git a/src/uicmd.cc b/src/uicmd.cc
index 84e7e4cd..4f737255 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -583,6 +583,9 @@ static BrowserWindow *UIcmd_tab_new(CustTabs *tabs, UI *old_ui, int focus)
Layout *layout = new Layout (platform);
style::Color *bgColor = style::Color::create (layout, prefs.bg_color);
layout->setBgColor (bgColor);
+ layout->setBgImage (NULL, style::BACKGROUND_REPEAT,
+ style::BACKGROUND_ATTACHMENT_SCROLL,
+ style::createPerLength (0), style::createPerLength (0));
// set_render_layout() sets the proper viewport size
FltkViewport *viewport = new FltkViewport (0, 0, 0, 1);
diff --git a/src/web.cc b/src/web.cc
index a469ccb2..0a8ee710 100644
--- a/src/web.cc
+++ b/src/web.cc
@@ -67,6 +67,10 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web,
style::Color *bgColor = style::Color::create (layout, prefs.bg_color);
Web->bgColor = bgColor->getColor ();
layout->setBgColor (bgColor);
+ layout->setBgImage (NULL, style::BACKGROUND_REPEAT,
+ style::BACKGROUND_ATTACHMENT_SCROLL,
+ style::createPerLength (0),
+ style::createPerLength (0));
/* Set a style for the widget */
StyleEngine styleEngine (layout);