summaryrefslogtreecommitdiff
path: root/src/RootTheme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/RootTheme.cc')
-rw-r--r--src/RootTheme.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/RootTheme.cc b/src/RootTheme.cc
index f3695dd..6e489e1 100644
--- a/src/RootTheme.cc
+++ b/src/RootTheme.cc
@@ -19,7 +19,7 @@
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.4 2003/08/25 16:02:24 fluxgen Exp $ 22// $Id: RootTheme.cc,v 1.5 2003/09/12 21:34:22 fluxgen Exp $
23 23
24#include "RootTheme.hh" 24#include "RootTheme.hh"
25 25
@@ -31,24 +31,19 @@ RootTheme::RootTheme(int screen_num, std::string &screen_root_command):
31 m_root_command(*this, "rootCommand", "RootCommand"), 31 m_root_command(*this, "rootCommand", "RootCommand"),
32 m_bevel_width(*this, "bevelWidth", "BevelWidth"), 32 m_bevel_width(*this, "bevelWidth", "BevelWidth"),
33 m_handle_width(*this, "handleWidth", "HandleWidth"), 33 m_handle_width(*this, "handleWidth", "HandleWidth"),
34 m_screen_root_command(screen_root_command) { 34 m_screen_root_command(screen_root_command),
35 m_opgc(RootWindow(FbTk::App::instance()->display(), screen_num)) {
35 36
36 *m_bevel_width = 0; 37 *m_bevel_width = 0;
37 *m_handle_width = 0; 38 *m_handle_width = 0;
38
39 XGCValues gcv;
40 Display *disp = FbTk::App::instance()->display(); 39 Display *disp = FbTk::App::instance()->display();
41 gcv.foreground = WhitePixel(disp, screen_num)^BlackPixel(disp, screen_num); 40 m_opgc.setForeground(WhitePixel(disp, screen_num)^BlackPixel(disp, screen_num));
42 gcv.function = GXxor; 41 m_opgc.setFunction(GXxor);
43 gcv.subwindow_mode = IncludeInferiors; 42 m_opgc.setSubwindowMode(IncludeInferiors);
44 m_opgc = XCreateGC(disp,
45 RootWindow(disp, screen_num),
46 GCForeground | GCFunction | GCSubwindowMode, &gcv);
47} 43}
48 44
49RootTheme::~RootTheme() { 45RootTheme::~RootTheme() {
50 if (m_opgc != 0) 46
51 XFreeGC(FbTk::App::instance()->display(), m_opgc);
52} 47}
53 48
54void RootTheme::reconfigTheme() { 49void RootTheme::reconfigTheme() {