Fixed rootcommand
This commit is contained in:
parent
affb5bda33
commit
add890ad21
2 changed files with 35 additions and 27 deletions
|
@ -125,7 +125,9 @@ static int dcmp(const void *one, const void *two) {
|
||||||
return (strcmp((*(char **) one), (*(char **) 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;
|
theme = 0;
|
||||||
fluxbox = b;
|
fluxbox = b;
|
||||||
|
|
||||||
|
@ -192,7 +194,7 @@ BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) {
|
||||||
|
|
||||||
image_control->setDither(resource.image_dither);
|
image_control->setDither(resource.image_dither);
|
||||||
theme = new Theme(getBaseDisplay()->getXDisplay(), getRootWindow(), getColormap(), getScreenNumber(),
|
theme = new Theme(getBaseDisplay()->getXDisplay(), getRootWindow(), getColormap(), getScreenNumber(),
|
||||||
image_control, fluxbox->getStyleFilename(), fluxbox->getRootCommand());
|
image_control, fluxbox->getStyleFilename(), getRootCommand().c_str());
|
||||||
|
|
||||||
#ifdef GNOME
|
#ifdef GNOME
|
||||||
/* create the GNOME window */
|
/* create the GNOME window */
|
||||||
|
@ -203,14 +205,16 @@ BScreen::BScreen(Fluxbox *b, int scrn) : ScreenInfo(b, scrn) {
|
||||||
XChangeProperty(getBaseDisplay()->getXDisplay(),
|
XChangeProperty(getBaseDisplay()->getXDisplay(),
|
||||||
getRootWindow(), getBaseDisplay()->getGnomeSupportingWMCheckAtom(),
|
getRootWindow(), getBaseDisplay()->getGnomeSupportingWMCheckAtom(),
|
||||||
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1);
|
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1);
|
||||||
|
|
||||||
XChangeProperty(getBaseDisplay()->getXDisplay(), gnome_win,
|
XChangeProperty(getBaseDisplay()->getXDisplay(), gnome_win,
|
||||||
getBaseDisplay()->getGnomeSupportingWMCheckAtom(),
|
getBaseDisplay()->getGnomeSupportingWMCheckAtom(),
|
||||||
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1);
|
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1);
|
||||||
|
|
||||||
|
Atom gnomeatomlist[1] = {getBaseDisplay()->getGnomeWorkspaceAtom()};
|
||||||
XChangeProperty(getBaseDisplay()->getXDisplay(),
|
XChangeProperty(getBaseDisplay()->getXDisplay(),
|
||||||
getRootWindow(), getBaseDisplay()->getGnomeProtAtom(),
|
getRootWindow(), getBaseDisplay()->getGnomeProtAtom(),
|
||||||
XA_ATOM, 32, PropModeReplace,
|
XA_ATOM, 32, PropModeReplace,
|
||||||
(unsigned char *)getBaseDisplay()->getGnomeListAtoms(), 10);
|
(unsigned char *)gnomeatomlist, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -433,10 +437,11 @@ BScreen::~BScreen(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BScreen::reconfigure(void) {
|
void BScreen::reconfigure(void) {
|
||||||
if (Fluxbox::instance()->getRootCommand())
|
#ifdef DEBUG
|
||||||
theme->setRootCommand(Fluxbox::instance()->getRootCommand());
|
cerr<<__FILE__<<"("<<__LINE__<<"): BScreen::reconfigure"<<endl;
|
||||||
else
|
#endif
|
||||||
theme->setRootCommand("");
|
Fluxbox::instance()->loadRootCommand(this);
|
||||||
|
theme->setRootCommand(getRootCommand());
|
||||||
|
|
||||||
theme->load(fluxbox->getStyleFilename());
|
theme->load(fluxbox->getStyleFilename());
|
||||||
theme->reconfigure();
|
theme->reconfigure();
|
||||||
|
|
|
@ -22,29 +22,12 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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_
|
#ifndef _SCREEN_HH_
|
||||||
#define _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"
|
#include "Theme.hh"
|
||||||
|
|
||||||
// forward declaration
|
// forward declaration
|
||||||
|
@ -84,6 +67,24 @@ class BScreen;
|
||||||
# include "Slit.hh"
|
# include "Slit.hh"
|
||||||
#endif // SLIT
|
#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 {
|
class BScreen : public ScreenInfo {
|
||||||
public:
|
public:
|
||||||
BScreen(Fluxbox *, int);
|
BScreen(Fluxbox *, int);
|
||||||
|
@ -120,7 +121,7 @@ public:
|
||||||
inline const BColor *getBorderColor(void) { return &theme->getBorderColor(); }
|
inline const BColor *getBorderColor(void) { return &theme->getBorderColor(); }
|
||||||
inline BImageControl *getImageControl(void) { return image_control; }
|
inline BImageControl *getImageControl(void) { return image_control; }
|
||||||
inline Rootmenu *getRootmenu(void) { return rootmenu; }
|
inline Rootmenu *getRootmenu(void) { return rootmenu; }
|
||||||
|
inline std::string &getRootCommand(void) { return rootcommand; }
|
||||||
#ifdef SLIT
|
#ifdef SLIT
|
||||||
inline const Bool &isSlitOnTop(void) const { return resource.slit_on_top; }
|
inline const Bool &isSlitOnTop(void) const { return resource.slit_on_top; }
|
||||||
inline const Bool &doSlitAutoHide(void) const
|
inline const Bool &doSlitAutoHide(void) const
|
||||||
|
@ -183,6 +184,7 @@ public:
|
||||||
{ return resource.tab_alignment; }
|
{ return resource.tab_alignment; }
|
||||||
|
|
||||||
inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; }
|
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 saveSloppyFocus(Bool s) { resource.sloppy_focus = s; }
|
||||||
inline void saveSemiSloppyFocus(Bool s) { resource.semi_sloppy_focus = s; }
|
inline void saveSemiSloppyFocus(Bool s) { resource.semi_sloppy_focus = s; }
|
||||||
inline void saveAutoRaise(Bool a) { resource.auto_raise = a; }
|
inline void saveAutoRaise(Bool a) { resource.auto_raise = a; }
|
||||||
|
@ -278,6 +280,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Theme *theme;
|
Theme *theme;
|
||||||
|
std::string rootcommand;
|
||||||
|
|
||||||
Bool root_colormap_installed, managed, geom_visible;
|
Bool root_colormap_installed, managed, geom_visible;
|
||||||
GC opGC;
|
GC opGC;
|
||||||
|
|
Loading…
Reference in a new issue