summaryrefslogtreecommitdiff
blob: a74a4ffb041c96764be8351c62bb4a92a9babc1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From 2c60fe4addd9480d78bf6d41c4aa9c179c70df01 Mon Sep 17 00:00:00 2001
From: Jim Ramsay <i.am@jimramsay.com>
Date: Fri, 24 Apr 2009 11:25:08 -0400
Subject: [PATCH 1/2] Allow 'background: unset'

When a user sets 'background: none' it really means "Do not let themes touch the
background I have already set with fbsetbg" -> It does still actually call
fbsetbeg to re-assert the proper background.

This new value 'unset' is for users who will use an alternate method to set
their background (root-tail, xscreensaver, or whatever).  It instructs fluxbox
to *never* run fbsetbg.
---
 src/RootTheme.cc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/RootTheme.cc b/src/RootTheme.cc
index 049eb27..34c06e9 100644
--- a/src/RootTheme.cc
+++ b/src/RootTheme.cc
@@ -202,6 +202,10 @@ void RootTheme::reconfigTheme() {
     filename = FbTk::StringUtil::expandFilename(filename);
     std::string cmd = realProgramName("fbsetbg") + (m_first ? " -z " : " -Z ");
 
+    // user explicitly requests NO background be set at all
+    if (strstr(m_background->options().c_str(), "unset") != 0) {
+        return;
+    }
     // style doesn't wish to change the background
     if (strstr(m_background->options().c_str(), "none") != 0) {
         if (!m_first)
-- 
1.6.2


From 23857ca509be6a8ffa306c23c8d39942105a13f9 Mon Sep 17 00:00:00 2001
From: Jim Ramsay <i.am@jimramsay.com>
Date: Fri, 24 Apr 2009 14:15:58 -0400
Subject: [PATCH 2/2] Don't complain on '-z' if there's no lastwallpaper

This hides the odd cornercase of users with no lastwallpaper file and no
background set in their style or overlay.

Adapted from the patch at
http://sourceforge.net/tracker/?func=detail&aid=2389567&group_id=35398&atid=413962
---
 util/fbsetbg |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/util/fbsetbg b/util/fbsetbg
index a12d427..47aa33b 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -308,6 +308,7 @@ while [ $# -gt 0 ]; do
                 remember=false
                 break
             fi
+            ignore_missing_wallpaper=true
             style="style"
             shift ;;
         -Z)
@@ -521,6 +522,9 @@ fi
 
 
 if [ ! -r "$wallpaper" ]; then
+	if [ "$ignore_missing_wallpaper" == "true" ]; then
+		exit 0
+	fi
     message "Can't find wallpaper $wallpaper"
     exit 1
 fi
-- 
1.6.2