diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 9f67c3b..74b0c22 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -125,7 +125,9 @@ static int dcmp(const void *one, const void *two) { | |||
125 | return (strcmp((*(char **) one), (*(char **) two))); | 125 | return (strcmp((*(char **) one), (*(char **) two))); |
126 | } | 126 | } |
127 | 127 | ||
128 | BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) { | 128 | BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn), |
129 | rootcommand("") | ||
130 | { | ||
129 | theme = 0; | 131 | theme = 0; |
130 | fluxbox = b; | 132 | fluxbox = b; |
131 | 133 | ||
@@ -192,7 +194,7 @@ BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) { | |||
192 | 194 | ||
193 | image_control->setDither(resource.image_dither); | 195 | image_control->setDither(resource.image_dither); |
194 | theme = new Theme(getBaseDisplay()->getXDisplay(), getRootWindow(), getColormap(), getScreenNumber(), | 196 | theme = new Theme(getBaseDisplay()->getXDisplay(), getRootWindow(), getColormap(), getScreenNumber(), |
195 | image_control, fluxbox->getStyleFilename(), fluxbox->getRootCommand()); | 197 | image_control, fluxbox->getStyleFilename(), getRootCommand().c_str()); |
196 | 198 | ||
197 | #ifdef GNOME | 199 | #ifdef GNOME |
198 | /* create the GNOME window */ | 200 | /* create the GNOME window */ |
@@ -203,14 +205,16 @@ BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) { | |||
203 | XChangeProperty(getBaseDisplay()->getXDisplay(), | 205 | XChangeProperty(getBaseDisplay()->getXDisplay(), |
204 | getRootWindow(), getBaseDisplay()->getGnomeSupportingWMCheckAtom(), | 206 | getRootWindow(), getBaseDisplay()->getGnomeSupportingWMCheckAtom(), |
205 | XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); | 207 | XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); |
208 | |||
206 | XChangeProperty(getBaseDisplay()->getXDisplay(), gnome_win, | 209 | XChangeProperty(getBaseDisplay()->getXDisplay(), gnome_win, |
207 | getBaseDisplay()->getGnomeSupportingWMCheckAtom(), | 210 | getBaseDisplay()->getGnomeSupportingWMCheckAtom(), |
208 | XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); | 211 | XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); |
209 | 212 | ||
213 | Atom gnomeatomlist[1] = {getBaseDisplay()->getGnomeWorkspaceAtom()}; | ||
210 | XChangeProperty(getBaseDisplay()->getXDisplay(), | 214 | XChangeProperty(getBaseDisplay()->getXDisplay(), |
211 | getRootWindow(), getBaseDisplay()->getGnomeProtAtom(), | 215 | getRootWindow(), getBaseDisplay()->getGnomeProtAtom(), |
212 | XA_ATOM, 32, PropModeReplace, | 216 | XA_ATOM, 32, PropModeReplace, |
213 | (unsigned char *)getBaseDisplay()->getGnomeListAtoms(), 10); | 217 | (unsigned char *)gnomeatomlist, 1); |
214 | #endif | 218 | #endif |
215 | 219 | ||
216 | 220 | ||
@@ -433,10 +437,11 @@ BScreen::~BScreen(void) { | |||
433 | } | 437 | } |
434 | 438 | ||
435 | void BScreen::reconfigure(void) { | 439 | void BScreen::reconfigure(void) { |
436 | if (Fluxbox::instance()->getRootCommand()) | 440 | #ifdef DEBUG |
437 | theme->setRootCommand(Fluxbox::instance()->getRootCommand()); | 441 | cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl; |
438 | else | 442 | #endif |
439 | theme->setRootCommand(""); | 443 | Fluxbox::instance()->loadRootCommand(this); |
444 | theme->setRootCommand(getRootCommand()); | ||
440 | 445 | ||
441 | theme->load(fluxbox->getStyleFilename()); | 446 | theme->load(fluxbox->getStyleFilename()); |
442 | theme->reconfigure(); | 447 | theme->reconfigure(); |