diff options
author | fluxgen <fluxgen> | 2004-01-02 13:29:01 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-01-02 13:29:01 (GMT) |
commit | 345ef845c94bb4d77ed210e2c7a2c252d3068d59 (patch) | |
tree | 48df8829a4a14fc744b901b1b3c30990bd6c4862 /src/RootTheme.cc | |
parent | e9b5ad4e401e8742b0871889476ddc4eeae60b08 (diff) | |
download | fluxbox_pavel-345ef845c94bb4d77ed210e2c7a2c252d3068d59.zip fluxbox_pavel-345ef845c94bb4d77ed210e2c7a2c252d3068d59.tar.bz2 |
lock roottheme so it doesn't get run twice
Diffstat (limited to 'src/RootTheme.cc')
-rw-r--r-- | src/RootTheme.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/RootTheme.cc b/src/RootTheme.cc index 15723ac..03eb8b1 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc | |||
@@ -19,19 +19,20 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: RootTheme.cc,v 1.6 2003/09/12 23:33:13 fluxgen Exp $ | 22 | // $Id: RootTheme.cc,v 1.7 2004/01/02 13:28:38 fluxgen Exp $ |
23 | 23 | ||
24 | #include "RootTheme.hh" | 24 | #include "RootTheme.hh" |
25 | 25 | ||
26 | #include "FbCommands.hh" | 26 | #include "FbCommands.hh" |
27 | #include "App.hh" | 27 | #include "FbTk/App.hh" |
28 | 28 | ||
29 | RootTheme::RootTheme(int screen_num, std::string &screen_root_command): | 29 | RootTheme::RootTheme(int screen_num, std::string &screen_root_command): |
30 | FbTk::Theme(screen_num), | 30 | FbTk::Theme(screen_num), |
31 | m_root_command(*this, "rootCommand", "RootCommand"), | 31 | m_root_command(*this, "rootCommand", "RootCommand"), |
32 | m_screen_root_command(screen_root_command), | 32 | m_screen_root_command(screen_root_command), |
33 | m_opgc(RootWindow(FbTk::App::instance()->display(), screen_num)) { | 33 | m_opgc(RootWindow(FbTk::App::instance()->display(), screen_num)), |
34 | 34 | m_lock(false) { | |
35 | |||
35 | Display *disp = FbTk::App::instance()->display(); | 36 | Display *disp = FbTk::App::instance()->display(); |
36 | m_opgc.setForeground(WhitePixel(disp, screen_num)^BlackPixel(disp, screen_num)); | 37 | m_opgc.setForeground(WhitePixel(disp, screen_num)^BlackPixel(disp, screen_num)); |
37 | m_opgc.setFunction(GXxor); | 38 | m_opgc.setFunction(GXxor); |
@@ -43,6 +44,9 @@ RootTheme::~RootTheme() { | |||
43 | } | 44 | } |
44 | 45 | ||
45 | void RootTheme::reconfigTheme() { | 46 | void RootTheme::reconfigTheme() { |
47 | if (m_lock) | ||
48 | return; | ||
49 | |||
46 | // override resource root command? | 50 | // override resource root command? |
47 | if (m_screen_root_command == "") { | 51 | if (m_screen_root_command == "") { |
48 | // do root command | 52 | // do root command |