summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Screen.cc21
-rw-r--r--src/Screen.hh41
2 files changed, 35 insertions, 27 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
128BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) { 128BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn),
129rootcommand("")
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
435void BScreen::reconfigure(void) { 439void 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();
diff --git a/src/Screen.hh b/src/Screen.hh
index 35a4a85..92f1849 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -22,29 +22,12 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.hh,v 1.7 2002/01/09 14:11:20 fluxgen Exp $ 25// $Id: Screen.hh,v 1.8 2002/01/10 12:49:15 fluxgen Exp $
26 26
27#ifndef _SCREEN_HH_ 27#ifndef _SCREEN_HH_
28#define _SCREEN_HH_ 28#define _SCREEN_HH_
29 29
30 30
31
32#include <X11/Xlib.h>
33#include <X11/Xresource.h>
34
35#ifdef TIME_WITH_SYS_TIME
36# include <sys/time.h>
37# include <time.h>
38#else // !TIME_WITH_SYS_TIME
39# ifdef HAVE_SYS_TIME_H
40# include <sys/time.h>
41# else // !HAVE_SYS_TIME_H
42# include <time.h>
43# endif // HAVE_SYS_TIME_H
44#endif // TIME_WITH_SYS_TIME
45
46#include <stdio.h>
47
48#include "Theme.hh" 31#include "Theme.hh"
49 32
50// forward declaration 33// forward declaration
@@ -84,6 +67,24 @@ class BScreen;
84# include "Slit.hh" 67# include "Slit.hh"
85#endif // SLIT 68#endif // SLIT
86 69
70
71#include <X11/Xlib.h>
72#include <X11/Xresource.h>
73
74#ifdef TIME_WITH_SYS_TIME
75# include <sys/time.h>
76# include <time.h>
77#else // !TIME_WITH_SYS_TIME
78# ifdef HAVE_SYS_TIME_H
79# include <sys/time.h>
80# else // !HAVE_SYS_TIME_H
81# include <time.h>
82# endif // HAVE_SYS_TIME_H
83#endif // TIME_WITH_SYS_TIME
84
85#include <stdio.h>
86#include <string>
87
87class BScreen : public ScreenInfo { 88class BScreen : public ScreenInfo {
88public: 89public:
89 BScreen(Fluxbox *, int); 90 BScreen(Fluxbox *, int);
@@ -120,7 +121,7 @@ public:
120 inline const BColor *getBorderColor(void) { return &theme->getBorderColor(); } 121 inline const BColor *getBorderColor(void) { return &theme->getBorderColor(); }
121 inline BImageControl *getImageControl(void) { return image_control; } 122 inline BImageControl *getImageControl(void) { return image_control; }
122 inline Rootmenu *getRootmenu(void) { return rootmenu; } 123 inline Rootmenu *getRootmenu(void) { return rootmenu; }
123 124 inline std::string &getRootCommand(void) { return rootcommand; }
124#ifdef SLIT 125#ifdef SLIT
125 inline const Bool &isSlitOnTop(void) const { return resource.slit_on_top; } 126 inline const Bool &isSlitOnTop(void) const { return resource.slit_on_top; }
126 inline const Bool &doSlitAutoHide(void) const 127 inline const Bool &doSlitAutoHide(void) const
@@ -183,6 +184,7 @@ public:
183 { return resource.tab_alignment; } 184 { return resource.tab_alignment; }
184 185
185 inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; } 186 inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; }
187 inline void saveRootCommand(std::string rootcmd) { rootcommand = rootcmd; }
186 inline void saveSloppyFocus(Bool s) { resource.sloppy_focus = s; } 188 inline void saveSloppyFocus(Bool s) { resource.sloppy_focus = s; }
187 inline void saveSemiSloppyFocus(Bool s) { resource.semi_sloppy_focus = s; } 189 inline void saveSemiSloppyFocus(Bool s) { resource.semi_sloppy_focus = s; }
188 inline void saveAutoRaise(Bool a) { resource.auto_raise = a; } 190 inline void saveAutoRaise(Bool a) { resource.auto_raise = a; }
@@ -278,6 +280,7 @@ public:
278 280
279private: 281private:
280 Theme *theme; 282 Theme *theme;
283 std::string rootcommand;
281 284
282 Bool root_colormap_installed, managed, geom_visible; 285 Bool root_colormap_installed, managed, geom_visible;
283 GC opGC; 286 GC opGC;