all repos — fluxbox @ add890ad213be267e0efae7ae8c958e1f2614efb

custom fork of the fluxbox windowmanager

Fixed rootcommand
fluxgen fluxgen
commit

add890ad213be267e0efae7ae8c958e1f2614efb

parent

affb5bda338e4e9f805dd0e372ba0482f2b6cbc7

2 files changed, 35 insertions(+), 27 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -125,7 +125,9 @@ static int dcmp(const void *one, const void *two) {

return (strcmp((*(char **) one), (*(char **) two))); } -BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) { +BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn), +rootcommand("") +{ theme = 0; fluxbox = b;

@@ -192,7 +194,7 @@ fluxbox->load_rc(this);

image_control->setDither(resource.image_dither); theme = new Theme(getBaseDisplay()->getXDisplay(), getRootWindow(), getColormap(), getScreenNumber(), - image_control, fluxbox->getStyleFilename(), fluxbox->getRootCommand()); + image_control, fluxbox->getStyleFilename(), getRootCommand().c_str()); #ifdef GNOME /* create the GNOME window */

@@ -203,14 +205,16 @@ /* supported WM check */

XChangeProperty(getBaseDisplay()->getXDisplay(), getRootWindow(), getBaseDisplay()->getGnomeSupportingWMCheckAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); + XChangeProperty(getBaseDisplay()->getXDisplay(), gnome_win, getBaseDisplay()->getGnomeSupportingWMCheckAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); - + + Atom gnomeatomlist[1] = {getBaseDisplay()->getGnomeWorkspaceAtom()}; XChangeProperty(getBaseDisplay()->getXDisplay(), getRootWindow(), getBaseDisplay()->getGnomeProtAtom(), XA_ATOM, 32, PropModeReplace, - (unsigned char *)getBaseDisplay()->getGnomeListAtoms(), 10); + (unsigned char *)gnomeatomlist, 1); #endif

@@ -433,10 +437,11 @@

} void BScreen::reconfigure(void) { - if (Fluxbox::instance()->getRootCommand()) - theme->setRootCommand(Fluxbox::instance()->getRootCommand()); - else - theme->setRootCommand(""); + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl; + #endif + Fluxbox::instance()->loadRootCommand(this); + theme->setRootCommand(getRootCommand()); theme->load(fluxbox->getStyleFilename()); theme->reconfigure();
M src/Screen.hhsrc/Screen.hh

@@ -22,28 +22,11 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.7 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Screen.hh,v 1.8 2002/01/10 12:49:15 fluxgen Exp $ #ifndef _SCREEN_HH_ #define _SCREEN_HH_ - - -#include <X11/Xlib.h> -#include <X11/Xresource.h> - -#ifdef TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else // !TIME_WITH_SYS_TIME -# ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -# else // !HAVE_SYS_TIME_H -# include <time.h> -# endif // HAVE_SYS_TIME_H -#endif // TIME_WITH_SYS_TIME - -#include <stdio.h> #include "Theme.hh"

@@ -84,6 +67,24 @@ #ifdef SLIT

# include "Slit.hh" #endif // SLIT + +#include <X11/Xlib.h> +#include <X11/Xresource.h> + +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else // !TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else // !HAVE_SYS_TIME_H +# include <time.h> +# endif // HAVE_SYS_TIME_H +#endif // TIME_WITH_SYS_TIME + +#include <stdio.h> +#include <string> + class BScreen : public ScreenInfo { public: BScreen(Fluxbox *, int);

@@ -120,7 +121,7 @@

inline const BColor *getBorderColor(void) { return &theme->getBorderColor(); } inline BImageControl *getImageControl(void) { return image_control; } inline Rootmenu *getRootmenu(void) { return rootmenu; } - + inline std::string &getRootCommand(void) { return rootcommand; } #ifdef SLIT inline const Bool &isSlitOnTop(void) const { return resource.slit_on_top; } inline const Bool &doSlitAutoHide(void) const

@@ -183,6 +184,7 @@ inline const int getTabAlignment(void)

{ return resource.tab_alignment; } inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; } + inline void saveRootCommand(std::string rootcmd) { rootcommand = rootcmd; } inline void saveSloppyFocus(Bool s) { resource.sloppy_focus = s; } inline void saveSemiSloppyFocus(Bool s) { resource.semi_sloppy_focus = s; } inline void saveAutoRaise(Bool a) { resource.auto_raise = a; }

@@ -278,6 +280,7 @@ WindowLower, WindowStick, WindowKill, SetStyle, WindowTab};

private: Theme *theme; + std::string rootcommand; Bool root_colormap_installed, managed, geom_visible; GC opGC;