Add -no-slit and -no-toolbar flags
Sometimes fluxbox is used as a component of a desktop environment ( e.g., the "Lumina Desktop"). It's easier and more stable for this kind of "users" to disable the toolbar or the slit alltogether. Why not configure these features out? Because then they would need 2 installations of fluxbox: One without the slit and the toolbar (and perhaps other components) and one with them. This implements feature request #314, at least partially. This commit also looks bigger than it actually is: I refactored and cleaned up classes Fluxbox and BScreen.
This commit is contained in:
parent
3cda1099e2
commit
ab2eef4937
6 changed files with 267 additions and 262 deletions
|
@ -24,14 +24,13 @@
|
||||||
|
|
||||||
#include "NotCopyable.hh"
|
#include "NotCopyable.hh"
|
||||||
#include "Accessor.hh"
|
#include "Accessor.hh"
|
||||||
|
#include "XrmDatabaseHelper.hh"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include "XrmDatabaseHelper.hh"
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
|
|
111
src/Screen.cc
111
src/Screen.cc
|
@ -189,7 +189,8 @@ void initAtoms(Display* dpy) {
|
||||||
BScreen::BScreen(FbTk::ResourceManager &rm,
|
BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
const string &screenname,
|
const string &screenname,
|
||||||
const string &altscreenname,
|
const string &altscreenname,
|
||||||
int scrn, int num_layers) :
|
int scrn, int num_layers,
|
||||||
|
unsigned int opts) :
|
||||||
m_layermanager(num_layers),
|
m_layermanager(num_layers),
|
||||||
root_colormap_installed(false),
|
root_colormap_installed(false),
|
||||||
m_image_control(0),
|
m_image_control(0),
|
||||||
|
@ -214,19 +215,20 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
m_altname(altscreenname),
|
m_altname(altscreenname),
|
||||||
m_focus_control(new FocusControl(*this)),
|
m_focus_control(new FocusControl(*this)),
|
||||||
m_placement_strategy(new ScreenPlacement(*this)),
|
m_placement_strategy(new ScreenPlacement(*this)),
|
||||||
m_cycling(false), m_cycle_opts(0),
|
m_cycle_opts(0),
|
||||||
m_restart(false),
|
m_opts(opts) {
|
||||||
m_shutdown(false) {
|
|
||||||
|
|
||||||
|
|
||||||
|
m_state.cycling = false;
|
||||||
|
m_state.restart = false;
|
||||||
|
m_state.shutdown = false;
|
||||||
|
m_state.managed = false;
|
||||||
|
|
||||||
Fluxbox *fluxbox = Fluxbox::instance();
|
Fluxbox *fluxbox = Fluxbox::instance();
|
||||||
Display *disp = fluxbox->display();
|
Display *disp = fluxbox->display();
|
||||||
|
|
||||||
initAtoms(disp);
|
initAtoms(disp);
|
||||||
|
|
||||||
|
|
||||||
// TODO fluxgen: check if this is the right place (it was not -lis)
|
|
||||||
//
|
|
||||||
// Create the first one, initXinerama will expand this if needed.
|
// Create the first one, initXinerama will expand this if needed.
|
||||||
m_head_areas.resize(1);
|
m_head_areas.resize(1);
|
||||||
m_head_areas[0] = new HeadArea();
|
m_head_areas[0] = new HeadArea();
|
||||||
|
@ -244,8 +246,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
|
|
||||||
XSetErrorHandler((XErrorHandler) old);
|
XSetErrorHandler((XErrorHandler) old);
|
||||||
|
|
||||||
managed = running;
|
m_state.managed = running;
|
||||||
if (! managed) {
|
if (!m_state.managed) {
|
||||||
delete m_placement_strategy; m_placement_strategy = 0;
|
delete m_placement_strategy; m_placement_strategy = 0;
|
||||||
delete m_focus_control; m_focus_control = 0;
|
delete m_focus_control; m_focus_control = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -261,14 +263,12 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
#endif // HAVE_GETPID
|
#endif // HAVE_GETPID
|
||||||
|
|
||||||
// check if we're the first EWMH compliant window manager on this screen
|
// check if we're the first EWMH compliant window manager on this screen
|
||||||
Atom xa_ret_type;
|
union { Atom atom; unsigned long ul; int i; } ignore;
|
||||||
int ret_format;
|
|
||||||
unsigned long ret_nitems, ret_bytes_after;
|
|
||||||
unsigned char *ret_prop;
|
unsigned char *ret_prop;
|
||||||
if (rootWindow().property(atom_wm_check, 0l, 1l,
|
if (rootWindow().property(atom_wm_check, 0l, 1l,
|
||||||
False, XA_WINDOW, &xa_ret_type, &ret_format, &ret_nitems,
|
False, XA_WINDOW, &ignore.atom, &ignore.i, &ignore.ul,
|
||||||
&ret_bytes_after, &ret_prop) ) {
|
&ignore.ul, &ret_prop) ) {
|
||||||
m_restart = (ret_prop != NULL);
|
m_state.restart = (ret_prop != NULL);
|
||||||
XFree(ret_prop);
|
XFree(ret_prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
|
|
||||||
// check which desktop we should start on
|
// check which desktop we should start on
|
||||||
int first_desktop = 0;
|
int first_desktop = 0;
|
||||||
if (m_restart) {
|
if (m_state.restart) {
|
||||||
bool exists;
|
bool exists;
|
||||||
int ret = (rootWindow().cardinalProperty(atom_net_desktop, &exists));
|
int ret = (rootWindow().cardinalProperty(atom_net_desktop, &exists));
|
||||||
if (exists) {
|
if (exists) {
|
||||||
|
@ -373,8 +373,10 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
changeWorkspaceID(first_desktop);
|
changeWorkspaceID(first_desktop);
|
||||||
|
|
||||||
#ifdef USE_SLIT
|
#ifdef USE_SLIT
|
||||||
m_slit.reset(new Slit(*this, *layerManager().getLayer(ResourceLayer::DESKTOP),
|
if (opts & Fluxbox::OPT_SLIT) {
|
||||||
fluxbox->getSlitlistFilename().c_str()));
|
Slit* slit = new Slit(*this, *layerManager().getLayer(ResourceLayer::DESKTOP), fluxbox->getSlitlistFilename().c_str());
|
||||||
|
m_slit.reset(slit);
|
||||||
|
}
|
||||||
#endif // USE_SLIT
|
#endif // USE_SLIT
|
||||||
|
|
||||||
rm.unlock();
|
rm.unlock();
|
||||||
|
@ -386,7 +388,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
|
|
||||||
BScreen::~BScreen() {
|
BScreen::~BScreen() {
|
||||||
|
|
||||||
if (! managed)
|
if (!m_state.managed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_toolbar.reset(0);
|
m_toolbar.reset(0);
|
||||||
|
@ -445,19 +447,23 @@ BScreen::~BScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BScreen::isRestart() {
|
bool BScreen::isRestart() {
|
||||||
return Fluxbox::instance()->isStartup() && m_restart;
|
return Fluxbox::instance()->isStartup() && m_state.restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BScreen::initWindows() {
|
void BScreen::initWindows() {
|
||||||
|
|
||||||
#ifdef USE_TOOLBAR
|
#ifdef USE_TOOLBAR
|
||||||
m_toolbar.reset(new Toolbar(*this,
|
if (m_opts & Fluxbox::OPT_TOOLBAR) {
|
||||||
*layerManager().getLayer(::ResourceLayer::NORMAL)));
|
Toolbar* tb = new Toolbar(*this, *layerManager().getLayer(::ResourceLayer::NORMAL));
|
||||||
|
m_toolbar.reset(tb);
|
||||||
|
}
|
||||||
#endif // USE_TOOLBAR
|
#endif // USE_TOOLBAR
|
||||||
|
|
||||||
unsigned int nchild;
|
unsigned int nchild;
|
||||||
Window r, p, *children;
|
Window r, p, *children;
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Fluxbox* fluxbox = Fluxbox::instance();
|
||||||
|
Display* disp = fluxbox->display();
|
||||||
|
|
||||||
XQueryTree(disp, rootWindow().window(), &r, &p, &children, &nchild);
|
XQueryTree(disp, rootWindow().window(), &r, &p, &children, &nchild);
|
||||||
|
|
||||||
// preen the window list of all icon windows... for better dockapp support
|
// preen the window list of all icon windows... for better dockapp support
|
||||||
|
@ -483,10 +489,8 @@ void BScreen::initWindows() {
|
||||||
}
|
}
|
||||||
XFree(wmhints);
|
XFree(wmhints);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Fluxbox *fluxbox = Fluxbox::instance();
|
|
||||||
|
|
||||||
// manage shown windows
|
// manage shown windows
|
||||||
Window transient_for = 0;
|
Window transient_for = 0;
|
||||||
|
@ -611,8 +615,8 @@ void BScreen::focusedWinFrameThemeReconfigured() {
|
||||||
Fluxbox *fluxbox = Fluxbox::instance();
|
Fluxbox *fluxbox = Fluxbox::instance();
|
||||||
const std::list<Focusable *> winlist =
|
const std::list<Focusable *> winlist =
|
||||||
focusControl().focusedOrderWinList().clientList();
|
focusControl().focusedOrderWinList().clientList();
|
||||||
std::list<Focusable *>::const_iterator it = winlist.begin(),
|
std::list<Focusable *>::const_iterator it = winlist.begin();
|
||||||
it_end = winlist.end();
|
std::list<Focusable *>::const_iterator it_end = winlist.end();
|
||||||
for (; it != it_end; ++it)
|
for (; it != it_end; ++it)
|
||||||
fluxbox->updateFrameExtents(*(*it)->fbwindow());
|
fluxbox->updateFrameExtents(*(*it)->fbwindow());
|
||||||
|
|
||||||
|
@ -661,14 +665,15 @@ void BScreen::keyPressEvent(XKeyEvent &ke) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BScreen::keyReleaseEvent(XKeyEvent &ke) {
|
void BScreen::keyReleaseEvent(XKeyEvent &ke) {
|
||||||
if (m_cycling) {
|
if (m_state.cycling) {
|
||||||
|
|
||||||
unsigned int state = FbTk::KeyUtil::instance().cleanMods(ke.state);
|
unsigned int state = FbTk::KeyUtil::instance().cleanMods(ke.state);
|
||||||
state &= ~FbTk::KeyUtil::instance().keycodeToModmask(ke.keycode);
|
state &= ~FbTk::KeyUtil::instance().keycodeToModmask(ke.keycode);
|
||||||
|
|
||||||
if (state) // still cycling
|
if (state) // still cycling
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_cycling = false;
|
m_state.cycling = false;
|
||||||
focusControl().stopCyclingFocus();
|
focusControl().stopCyclingFocus();
|
||||||
}
|
}
|
||||||
if (!Fluxbox::instance()->keys()->inKeychain())
|
if (!Fluxbox::instance()->keys()->inKeychain())
|
||||||
|
@ -693,8 +698,8 @@ void BScreen::cycleFocus(int options, const ClientPattern *pat, bool reverse) {
|
||||||
else if (ev.type == ButtonPress)
|
else if (ev.type == ButtonPress)
|
||||||
mods = FbTk::KeyUtil::instance().cleanMods(ev.xbutton.state);
|
mods = FbTk::KeyUtil::instance().cleanMods(ev.xbutton.state);
|
||||||
|
|
||||||
if (!m_cycling && mods) {
|
if (!m_state.cycling && mods) {
|
||||||
m_cycling = true;
|
m_state.cycling = true;
|
||||||
FbTk::EventManager::instance()->grabKeyboard(rootWindow().window());
|
FbTk::EventManager::instance()->grabKeyboard(rootWindow().window());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -849,13 +854,12 @@ void BScreen::removeClient(WinClient &client) {
|
||||||
int BScreen::addWorkspace() {
|
int BScreen::addWorkspace() {
|
||||||
|
|
||||||
bool save_name = getNameOfWorkspace(m_workspaces_list.size()) == "";
|
bool save_name = getNameOfWorkspace(m_workspaces_list.size()) == "";
|
||||||
Workspace *wkspc = new Workspace(*this,
|
std::string name = getNameOfWorkspace(m_workspaces_list.size());
|
||||||
getNameOfWorkspace(m_workspaces_list.size()),
|
Workspace *ws = new Workspace(*this, name, m_workspaces_list.size());
|
||||||
m_workspaces_list.size());
|
m_workspaces_list.push_back(ws);
|
||||||
m_workspaces_list.push_back(wkspc);
|
|
||||||
|
|
||||||
if (save_name) {
|
if (save_name) {
|
||||||
addWorkspaceName(wkspc->name().c_str());
|
addWorkspaceName(ws->name().c_str());
|
||||||
m_workspacenames_sig.emit(*this);
|
m_workspacenames_sig.emit(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1065,7 +1069,9 @@ bool BScreen::addKdeDockapp(Window client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
FluxboxWindow *BScreen::createWindow(Window client) {
|
FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
FbTk::App::instance()->sync(false);
|
|
||||||
|
Fluxbox* fluxbox = Fluxbox::instance();
|
||||||
|
fluxbox->sync(false);
|
||||||
|
|
||||||
if (isKdeDockapp(client) && addKdeDockapp(client)) {
|
if (isKdeDockapp(client) && addKdeDockapp(client)) {
|
||||||
return 0; // dont create a FluxboxWindow for this one
|
return 0; // dont create a FluxboxWindow for this one
|
||||||
|
@ -1084,14 +1090,14 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if it should be grouped with something else
|
// check if it should be grouped with something else
|
||||||
FluxboxWindow *win;
|
WinClient* other = findGroupLeft(*winclient);
|
||||||
WinClient *other;
|
FluxboxWindow* win = other ? other->fbwindow() : 0;
|
||||||
if ((other = findGroupLeft(*winclient)) && (win = other->fbwindow())) {
|
|
||||||
win->attachClient(*winclient);
|
|
||||||
Fluxbox::instance()->attachSignals(*winclient);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
Fluxbox::instance()->attachSignals(*winclient);
|
if (other && win) {
|
||||||
|
win->attachClient(*winclient);
|
||||||
|
fluxbox->attachSignals(*winclient);
|
||||||
|
} else {
|
||||||
|
fluxbox->attachSignals(*winclient);
|
||||||
if (winclient->fbwindow()) { // may have been set in an atomhandler
|
if (winclient->fbwindow()) { // may have been set in an atomhandler
|
||||||
win = winclient->fbwindow();
|
win = winclient->fbwindow();
|
||||||
Workspace *workspace = getWorkspace(win->workspaceNumber());
|
Workspace *workspace = getWorkspace(win->workspaceNumber());
|
||||||
|
@ -1109,7 +1115,7 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
|
|
||||||
// add the window to the focus list
|
// add the window to the focus list
|
||||||
// always add to front on startup to keep the focus order the same
|
// always add to front on startup to keep the focus order the same
|
||||||
if (win->isFocused() || Fluxbox::instance()->isStartup())
|
if (win->isFocused() || fluxbox->isStartup())
|
||||||
focusControl().addFocusFront(*winclient);
|
focusControl().addFocusFront(*winclient);
|
||||||
else
|
else
|
||||||
focusControl().addFocusBack(*winclient);
|
focusControl().addFocusBack(*winclient);
|
||||||
|
@ -1123,7 +1129,7 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
|
|
||||||
m_clientlist_sig.emit(*this);
|
m_clientlist_sig.emit(*this);
|
||||||
|
|
||||||
FbTk::App::instance()->sync(false);
|
fluxbox->sync(false);
|
||||||
return win;
|
return win;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1386,7 +1392,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
|
||||||
void BScreen::shutdown() {
|
void BScreen::shutdown() {
|
||||||
rootWindow().setEventMask(NoEventMask);
|
rootWindow().setEventMask(NoEventMask);
|
||||||
FbTk::App::instance()->sync(false);
|
FbTk::App::instance()->sync(false);
|
||||||
m_shutdown = true;
|
m_state.shutdown = true;
|
||||||
m_focus_control->shutdown();
|
m_focus_control->shutdown();
|
||||||
for_each(m_workspaces_list.begin(),
|
for_each(m_workspaces_list.begin(),
|
||||||
m_workspaces_list.end(),
|
m_workspaces_list.end(),
|
||||||
|
@ -1701,15 +1707,12 @@ int BScreen::getCurrHead() const {
|
||||||
if (!hasXinerama()) return 0;
|
if (!hasXinerama()) return 0;
|
||||||
int root_x = 0, root_y = 0;
|
int root_x = 0, root_y = 0;
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
int ignore_i;
|
union { int i; unsigned int ui; Window w; } ignore;
|
||||||
unsigned int ignore_ui;
|
|
||||||
|
|
||||||
Window ignore_w;
|
|
||||||
|
|
||||||
XQueryPointer(FbTk::App::instance()->display(),
|
XQueryPointer(FbTk::App::instance()->display(),
|
||||||
rootWindow().window(), &ignore_w,
|
rootWindow().window(), &ignore.w,
|
||||||
&ignore_w, &root_x, &root_y,
|
&ignore.w, &root_x, &root_y,
|
||||||
&ignore_i, &ignore_i, &ignore_ui);
|
&ignore.i, &ignore.i, &ignore.ui);
|
||||||
#endif // XINERAMA
|
#endif // XINERAMA
|
||||||
return getHead(root_x, root_y);
|
return getHead(root_x, root_y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,20 +79,19 @@ class FbWindow;
|
||||||
class BScreen: public FbTk::EventHandler, private FbTk::NotCopyable {
|
class BScreen: public FbTk::EventHandler, private FbTk::NotCopyable {
|
||||||
public:
|
public:
|
||||||
typedef std::list<FluxboxWindow *> Icons;
|
typedef std::list<FluxboxWindow *> Icons;
|
||||||
|
|
||||||
typedef std::vector<Workspace *> Workspaces;
|
typedef std::vector<Workspace *> Workspaces;
|
||||||
typedef std::vector<std::string> WorkspaceNames;
|
typedef std::vector<std::string> WorkspaceNames;
|
||||||
|
|
||||||
BScreen(FbTk::ResourceManager &rm,
|
BScreen(FbTk::ResourceManager &rm,
|
||||||
const std::string &screenname, const std::string &altscreenname,
|
const std::string &screenname, const std::string &altscreenname,
|
||||||
int scrn, int number_of_layers);
|
int scrn, int number_of_layers, unsigned int opts);
|
||||||
~BScreen();
|
~BScreen();
|
||||||
|
|
||||||
void initWindows();
|
void initWindows();
|
||||||
void initMenus();
|
void initMenus();
|
||||||
|
|
||||||
bool isRootColormapInstalled() const { return root_colormap_installed; }
|
bool isRootColormapInstalled() const { return root_colormap_installed; }
|
||||||
bool isScreenManaged() const { return managed; }
|
bool isScreenManaged() const { return m_state.managed; }
|
||||||
bool isWorkspaceWarping() const { return (m_workspaces_list.size() > 1) && *resource.workspace_warping; }
|
bool isWorkspaceWarping() const { return (m_workspaces_list.size() > 1) && *resource.workspace_warping; }
|
||||||
bool doAutoRaise() const { return *resource.auto_raise; }
|
bool doAutoRaise() const { return *resource.auto_raise; }
|
||||||
bool clickRaises() const { return *resource.click_raises; }
|
bool clickRaises() const { return *resource.click_raises; }
|
||||||
|
@ -222,7 +221,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void cycleFocus(int opts = 0, const ClientPattern *pat = 0, bool reverse = false);
|
void cycleFocus(int opts = 0, const ClientPattern *pat = 0, bool reverse = false);
|
||||||
|
|
||||||
bool isCycling() const { return m_cycling; }
|
bool isCycling() const { return m_state.cycling; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For extras to add menus.
|
* For extras to add menus.
|
||||||
|
@ -267,7 +266,7 @@ public:
|
||||||
const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; }
|
const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; }
|
||||||
const std::string &name() const { return m_name; }
|
const std::string &name() const { return m_name; }
|
||||||
const std::string &altName() const { return m_altname; }
|
const std::string &altName() const { return m_altname; }
|
||||||
bool isShuttingdown() const { return m_shutdown; }
|
bool isShuttingdown() const { return m_state.shutdown; }
|
||||||
bool isRestart();
|
bool isRestart();
|
||||||
|
|
||||||
ScreenPlacement &placementStrategy() { return *m_placement_strategy; }
|
ScreenPlacement &placementStrategy() { return *m_placement_strategy; }
|
||||||
|
@ -516,7 +515,6 @@ private:
|
||||||
typedef std::map<Window, WinClient *> Groupables;
|
typedef std::map<Window, WinClient *> Groupables;
|
||||||
Groupables m_expecting_groups;
|
Groupables m_expecting_groups;
|
||||||
|
|
||||||
bool m_cycling;
|
|
||||||
const ClientPattern *m_cycle_opts;
|
const ClientPattern *m_cycle_opts;
|
||||||
|
|
||||||
// Xinerama related private data
|
// Xinerama related private data
|
||||||
|
@ -536,10 +534,13 @@ private:
|
||||||
|
|
||||||
std::vector<HeadArea*> m_head_areas;
|
std::vector<HeadArea*> m_head_areas;
|
||||||
|
|
||||||
|
struct {
|
||||||
bool m_restart;
|
bool cycling;
|
||||||
bool m_shutdown;
|
bool restart;
|
||||||
|
bool shutdown;
|
||||||
bool managed;
|
bool managed;
|
||||||
|
} m_state;
|
||||||
|
unsigned int m_opts; // hold Fluxbox::OPT_SLIT etc
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,8 @@ int FluxboxCli::Options::parse(int argc, char** argv) {
|
||||||
"-display <string>\t\tuse display connection.\n"
|
"-display <string>\t\tuse display connection.\n"
|
||||||
"-screen <all|int,int,int>\trun on specified screens only.\n"
|
"-screen <all|int,int,int>\trun on specified screens only.\n"
|
||||||
"-rc <string>\t\t\tuse alternate resource file.\n"
|
"-rc <string>\t\t\tuse alternate resource file.\n"
|
||||||
|
"-no-slit\t\t\tdo not provide a slit.\n"
|
||||||
|
"-no-toolbar\t\t\tdo not provide a toolbar.\n"
|
||||||
"-version\t\t\tdisplay version and exit.\n"
|
"-version\t\t\tdisplay version and exit.\n"
|
||||||
"-info\t\t\t\tdisplay some useful information.\n"
|
"-info\t\t\t\tdisplay some useful information.\n"
|
||||||
"-list-commands\t\t\tlist all valid key commands.\n"
|
"-list-commands\t\t\tlist all valid key commands.\n"
|
||||||
|
@ -136,7 +138,7 @@ int FluxboxCli::Options::parse(int argc, char** argv) {
|
||||||
"-log <filename>\t\t\tlog output to file.\n"
|
"-log <filename>\t\t\tlog output to file.\n"
|
||||||
"-help\t\t\t\tdisplay this help text and exit.\n\n",
|
"-help\t\t\t\tdisplay this help text and exit.\n\n",
|
||||||
|
|
||||||
"Main usage string. Please lay it out nicely. There is one %s that is given the version").c_str(),
|
"Main usage string. Please lay it out nicely. One %%s gives the version, ther other gives the year").c_str(),
|
||||||
__fluxbox_version, "2001-2015");
|
__fluxbox_version, "2001-2015");
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
} else if (arg == "-info" || arg == "-i" || arg == "--info") {
|
} else if (arg == "-info" || arg == "-i" || arg == "--info") {
|
||||||
|
|
194
src/fluxbox.cc
194
src/fluxbox.cc
|
@ -81,10 +81,6 @@
|
||||||
|
|
||||||
// system headers
|
// system headers
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -111,6 +107,10 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
@ -230,54 +230,54 @@ int s_randr_event_type = 0; ///< the type number of randr event
|
||||||
int s_shape_eventbase = 0; ///< event base for shape events
|
int s_shape_eventbase = 0; ///< event base for shape events
|
||||||
bool s_have_shape = false ; ///< if shape is supported by server
|
bool s_have_shape = false ; ///< if shape is supported by server
|
||||||
|
|
||||||
Atom s_kwm1_dockwindow;
|
|
||||||
Atom s_kwm2_dockwindow;
|
|
||||||
|
|
||||||
Fluxbox* s_singleton = 0;
|
Fluxbox* s_singleton = 0;
|
||||||
|
|
||||||
} // end anonymous
|
} // end anonymous
|
||||||
|
|
||||||
|
|
||||||
|
bool Fluxbox::haveShape() const { return s_have_shape; }
|
||||||
|
int Fluxbox::shapeEventbase() const { return s_shape_eventbase; }
|
||||||
|
Fluxbox* Fluxbox::instance() { return s_singleton; }
|
||||||
|
|
||||||
|
Fluxbox::Config::Config(FbTk::ResourceManager& rm, const std::string& path) :
|
||||||
|
ignore_border(rm, false, "session.ignoreBorder", "Session.IgnoreBorder"),
|
||||||
|
pseudotrans(rm, false, "session.forcePseudoTransparency", "Session.forcePseudoTransparency"),
|
||||||
|
colors_per_channel(rm, 4, "session.colorsPerChannel", "Session.ColorsPerChannel"),
|
||||||
|
double_click_interval(rm, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"),
|
||||||
|
tabs_padding(rm, 0, "session.tabPadding", "Session.TabPadding"),
|
||||||
|
style_file(rm, DEFAULTSTYLE, "session.styleFile", "Session.StyleFile"),
|
||||||
|
overlay_file(rm, path + "/overlay", "session.styleOverlay", "Session.StyleOverlay"),
|
||||||
|
menu_file(rm, path + "/menu", "session.menuFile", "Session.MenuFile"),
|
||||||
|
key_file(rm, path + "/keys", "session.keyFile", "Session.KeyFile"),
|
||||||
|
slit_file(rm, path + "/slitlist", "session.slitlistFile", "Session.SlitlistFile"),
|
||||||
|
apps_file(rm, path + "/apps", "session.appsFile", "Session.AppsFile"),
|
||||||
|
tabs_attach_area(rm, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"),
|
||||||
|
cache_life(rm, 5, "session.cacheLife", "Session.CacheLife"),
|
||||||
|
cache_max(rm, 200, "session.cacheMax", "Session.CacheMax"),
|
||||||
|
auto_raise_delay(rm, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay") {
|
||||||
|
}
|
||||||
|
|
||||||
Fluxbox::Fluxbox(int argc, char **argv,
|
Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
const std::string& dpy_name,
|
const std::string& dpy_name,
|
||||||
const std::string& rc_path, const std::string& rc_filename, bool xsync)
|
const std::string& rc_path, const std::string& rc_filename, bool xsync)
|
||||||
: FbTk::App(dpy_name.c_str()),
|
: FbTk::App(dpy_name.c_str()),
|
||||||
m_fbatoms(FbAtoms::instance()),
|
m_fbatoms(FbAtoms::instance()),
|
||||||
m_resourcemanager(rc_filename.c_str(), true),
|
m_resourcemanager(rc_filename.c_str(), true),
|
||||||
// TODO: shouldn't need a separate one for screen
|
m_screen_rm(m_resourcemanager), // TODO: shouldn't need a separate one for screen
|
||||||
m_screen_rm(m_resourcemanager),
|
m_config(m_resourcemanager, rc_path),
|
||||||
|
|
||||||
m_RC_PATH(rc_path),
|
|
||||||
m_rc_ignoreborder(m_resourcemanager, false, "session.ignoreBorder", "Session.IgnoreBorder"),
|
|
||||||
m_rc_pseudotrans(m_resourcemanager, false, "session.forcePseudoTransparency", "Session.forcePseudoTransparency"),
|
|
||||||
m_rc_colors_per_channel(m_resourcemanager, 4,
|
|
||||||
"session.colorsPerChannel", "Session.ColorsPerChannel"),
|
|
||||||
m_rc_double_click_interval(m_resourcemanager, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"),
|
|
||||||
m_rc_tabs_padding(m_resourcemanager, 0, "session.tabPadding", "Session.TabPadding"),
|
|
||||||
m_rc_stylefile(m_resourcemanager, DEFAULTSTYLE, "session.styleFile", "Session.StyleFile"),
|
|
||||||
m_rc_styleoverlayfile(m_resourcemanager, m_RC_PATH + "/overlay", "session.styleOverlay", "Session.StyleOverlay"),
|
|
||||||
m_rc_menufile(m_resourcemanager, m_RC_PATH + "/menu", "session.menuFile", "Session.MenuFile"),
|
|
||||||
m_rc_keyfile(m_resourcemanager, m_RC_PATH + "/keys", "session.keyFile", "Session.KeyFile"),
|
|
||||||
m_rc_slitlistfile(m_resourcemanager, m_RC_PATH + "/slitlist", "session.slitlistFile", "Session.SlitlistFile"),
|
|
||||||
m_rc_appsfile(m_resourcemanager, m_RC_PATH + "/apps", "session.appsFile", "Session.AppsFile"),
|
|
||||||
m_rc_tabs_attach_area(m_resourcemanager, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"),
|
|
||||||
m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"),
|
|
||||||
m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"),
|
|
||||||
m_rc_auto_raise_delay(m_resourcemanager, 250, "session.autoRaiseDelay", "Session.AutoRaiseDelay"),
|
|
||||||
m_masked_window(0),
|
|
||||||
m_mousescreen(0),
|
|
||||||
m_keyscreen(0),
|
|
||||||
m_last_time(0),
|
m_last_time(0),
|
||||||
m_masked(0),
|
m_masked(0),
|
||||||
m_rc_file(rc_filename),
|
m_masked_window(0),
|
||||||
m_argv(argv), m_argc(argc),
|
m_argv(argv), m_argc(argc),
|
||||||
m_showing_dialog(false),
|
m_showing_dialog(false),
|
||||||
m_starting(true),
|
|
||||||
m_restarting(false),
|
|
||||||
m_shutdown(false),
|
|
||||||
m_server_grabs(0) {
|
m_server_grabs(0) {
|
||||||
|
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
|
m_state.restarting = false;
|
||||||
|
m_state.shutdown = false;
|
||||||
|
m_state.starting = true;
|
||||||
|
|
||||||
if (s_singleton != 0)
|
if (s_singleton != 0)
|
||||||
throw _FB_CONSOLETEXT(Fluxbox, FatalSingleton, "Fatal! There can only one instance of fluxbox class.", "Error displayed on weird error where an instance of the Fluxbox class already exists!");
|
throw _FB_CONSOLETEXT(Fluxbox, FatalSingleton, "Fatal! There can only one instance of fluxbox class.", "Error displayed on weird error where an instance of the Fluxbox class already exists!");
|
||||||
|
|
||||||
|
@ -287,14 +287,12 @@ Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
"Error message when no X display appears to exist");
|
"Error message when no X display appears to exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_config.file = rc_filename;
|
||||||
|
m_active_screen.mouse = 0;
|
||||||
|
m_active_screen.key = 0;
|
||||||
|
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Display *disp = FbTk::App::instance()->display();
|
||||||
// For KDE dock applets
|
|
||||||
// KDE v1.x
|
|
||||||
s_kwm1_dockwindow = XInternAtom(disp,
|
|
||||||
"KWM_DOCKWINDOW", False);
|
|
||||||
// KDE v2.x
|
|
||||||
s_kwm2_dockwindow = XInternAtom(disp,
|
|
||||||
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False);
|
|
||||||
// setup X error handler
|
// setup X error handler
|
||||||
XSetErrorHandler(handleXErrors);
|
XSetErrorHandler(handleXErrors);
|
||||||
XSetIOErrorHandler(handleXIOErrors);
|
XSetIOErrorHandler(handleXIOErrors);
|
||||||
|
@ -362,6 +360,8 @@ Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
m_key.reset(new Keys);
|
m_key.reset(new Keys);
|
||||||
m_key->reconfigure();
|
m_key->reconfigure();
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int opts = OPT_SLIT|OPT_TOOLBAR;
|
||||||
vector<int> screens;
|
vector<int> screens;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -396,16 +396,21 @@ Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
|
|
||||||
if (!vals.empty())
|
if (!vals.empty())
|
||||||
swap(scrtmp, screens);
|
swap(scrtmp, screens);
|
||||||
|
} else if (!strcmp(m_argv[i], "-no-slit")) {
|
||||||
|
opts &= ~OPT_SLIT;
|
||||||
|
} else if (!strcmp(m_argv[i], "-no-toolbar")) {
|
||||||
|
opts &= ~OPT_TOOLBAR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create screens
|
// create screens
|
||||||
for (size_t s = 0; s < screens.size(); s++) {
|
for (i = 0; i < static_cast<int>(screens.size()); i++) {
|
||||||
std::string sc_nr = FbTk::StringUtil::number2String(screens[s]);
|
std::string sc_nr = FbTk::StringUtil::number2String(screens[i]);
|
||||||
BScreen *screen = new BScreen(m_screen_rm.lock(),
|
BScreen *screen = new BScreen(m_screen_rm.lock(),
|
||||||
std::string("session.screen") + sc_nr,
|
std::string("session.screen") + sc_nr,
|
||||||
std::string("session.Screen") + sc_nr,
|
std::string("session.Screen") + sc_nr,
|
||||||
screens[s], ::ResourceLayer::NUM_LAYERS);
|
screens[i], ::ResourceLayer::NUM_LAYERS, opts);
|
||||||
|
|
||||||
// already handled
|
// already handled
|
||||||
if (! screen->isScreenManaged()) {
|
if (! screen->isScreenManaged()) {
|
||||||
|
@ -414,16 +419,16 @@ Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
}
|
}
|
||||||
|
|
||||||
// add to our list
|
// add to our list
|
||||||
m_screen_list.push_back(screen);
|
m_screens.push_back(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_screen_list.empty()) {
|
if (m_screens.empty()) {
|
||||||
throw _FB_CONSOLETEXT(Fluxbox, ErrorNoScreens,
|
throw _FB_CONSOLETEXT(Fluxbox, ErrorNoScreens,
|
||||||
"Couldn't find screens to manage.\nMake sure you don't have another window manager running.",
|
"Couldn't find screens to manage.\nMake sure you don't have another window manager running.",
|
||||||
"Error message when no unmanaged screens found - usually means another window manager is running");
|
"Error message when no unmanaged screens found - usually means another window manager is running");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_keyscreen = m_mousescreen = m_screen_list.front();
|
m_active_screen.key = m_active_screen.mouse = m_screens.front();
|
||||||
|
|
||||||
#ifdef USE_EWMH
|
#ifdef USE_EWMH
|
||||||
addAtomHandler(new Ewmh());
|
addAtomHandler(new Ewmh());
|
||||||
|
@ -437,7 +442,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
#endif // REMEMBER
|
#endif // REMEMBER
|
||||||
|
|
||||||
// init all "screens"
|
// init all "screens"
|
||||||
STLUtil::forAll(m_screen_list, bind1st(mem_fun(&Fluxbox::initScreen), this));
|
STLUtil::forAll(m_screens, bind1st(mem_fun(&Fluxbox::initScreen), this));
|
||||||
|
|
||||||
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
||||||
|
|
||||||
|
@ -453,7 +458,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
|
||||||
fbdbg<<"--- resource manager lockdepth = "<<m_resourcemanager.lockDepth()<<endl;
|
fbdbg<<"--- resource manager lockdepth = "<<m_resourcemanager.lockDepth()<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_starting = false;
|
m_state.starting = false;
|
||||||
//
|
//
|
||||||
// For dumping theme items
|
// For dumping theme items
|
||||||
// FbTk::ThemeManager::instance().listItems();
|
// FbTk::ThemeManager::instance().listItems();
|
||||||
|
@ -472,7 +477,7 @@ Fluxbox::~Fluxbox() {
|
||||||
leaveAll(); // leave all connections
|
leaveAll(); // leave all connections
|
||||||
|
|
||||||
// destroy screens (after others, as they may do screen things)
|
// destroy screens (after others, as they may do screen things)
|
||||||
FbTk::STLUtil::destroyAndClear(m_screen_list);
|
FbTk::STLUtil::destroyAndClear(m_screens);
|
||||||
|
|
||||||
FbTk::STLUtil::destroyAndClear(m_atomhandler);
|
FbTk::STLUtil::destroyAndClear(m_atomhandler);
|
||||||
}
|
}
|
||||||
|
@ -516,7 +521,7 @@ void Fluxbox::eventLoop() {
|
||||||
|
|
||||||
Display *disp = display();
|
Display *disp = display();
|
||||||
|
|
||||||
while (!m_shutdown) {
|
while (!m_state.shutdown) {
|
||||||
|
|
||||||
if (XPending(disp)) {
|
if (XPending(disp)) {
|
||||||
XEvent e;
|
XEvent e;
|
||||||
|
@ -584,20 +589,19 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
// update key/mouse screen and last time before we enter other eventhandlers
|
// update key/mouse screen and last time before we enter other eventhandlers
|
||||||
if (e->type == KeyPress ||
|
if (e->type == KeyPress ||
|
||||||
e->type == KeyRelease) {
|
e->type == KeyRelease) {
|
||||||
m_keyscreen = searchScreen(e->xkey.root);
|
m_active_screen.key = searchScreen(e->xkey.root);
|
||||||
} else if (e->type == ButtonPress ||
|
} else if (e->type == ButtonPress ||
|
||||||
e->type == ButtonRelease ||
|
e->type == ButtonRelease ||
|
||||||
e->type == MotionNotify ) {
|
e->type == MotionNotify ) {
|
||||||
|
m_last_time = e->xbutton.time;
|
||||||
if (e->type == MotionNotify)
|
if (e->type == MotionNotify)
|
||||||
m_last_time = e->xmotion.time;
|
m_last_time = e->xmotion.time;
|
||||||
else
|
|
||||||
m_last_time = e->xbutton.time;
|
|
||||||
|
|
||||||
m_mousescreen = searchScreen(e->xbutton.root);
|
m_active_screen.mouse = searchScreen(e->xbutton.root);
|
||||||
} else if (e->type == EnterNotify ||
|
} else if (e->type == EnterNotify ||
|
||||||
e->type == LeaveNotify) {
|
e->type == LeaveNotify) {
|
||||||
m_last_time = e->xcrossing.time;
|
m_last_time = e->xcrossing.time;
|
||||||
m_mousescreen = searchScreen(e->xcrossing.root);
|
m_active_screen.mouse = searchScreen(e->xcrossing.root);
|
||||||
} else if (e->type == PropertyNotify) {
|
} else if (e->type == PropertyNotify) {
|
||||||
m_last_time = e->xproperty.time;
|
m_last_time = e->xproperty.time;
|
||||||
// check transparency atoms if it's a root pm
|
// check transparency atoms if it's a root pm
|
||||||
|
@ -632,7 +636,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
xwc.sibling = e->xconfigurerequest.above;
|
xwc.sibling = e->xconfigurerequest.above;
|
||||||
xwc.stack_mode = e->xconfigurerequest.detail;
|
xwc.stack_mode = e->xconfigurerequest.detail;
|
||||||
|
|
||||||
XConfigureWindow(FbTk::App::instance()->display(),
|
XConfigureWindow(display(),
|
||||||
e->xconfigurerequest.window,
|
e->xconfigurerequest.window,
|
||||||
e->xconfigurerequest.value_mask, &xwc);
|
e->xconfigurerequest.value_mask, &xwc);
|
||||||
}
|
}
|
||||||
|
@ -760,14 +764,14 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
|
|
||||||
if (FbTk::Menu::focused() &&
|
if (FbTk::Menu::focused() &&
|
||||||
FbTk::Menu::focused()->window() == e->xfocus.window) {
|
FbTk::Menu::focused()->window() == e->xfocus.window) {
|
||||||
m_keyscreen = findScreen(FbTk::Menu::focused()->screenNumber());
|
m_active_screen.key = findScreen(FbTk::Menu::focused()->screenNumber());
|
||||||
FocusControl::setFocusedWindow(0);
|
FocusControl::setFocusedWindow(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
WinClient *winclient = searchWindow(e->xfocus.window);
|
WinClient *winclient = searchWindow(e->xfocus.window);
|
||||||
if (winclient)
|
if (winclient)
|
||||||
m_keyscreen = &winclient->screen();
|
m_active_screen.key = &winclient->screen();
|
||||||
FocusControl::setFocusedWindow(winclient);
|
FocusControl::setFocusedWindow(winclient);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
@ -981,8 +985,8 @@ BScreen *Fluxbox::searchScreen(Window window) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenList::iterator it = m_screen_list.begin();
|
ScreenList::iterator it = m_screens.begin();
|
||||||
ScreenList::iterator it_end = m_screen_list.end();
|
ScreenList::iterator it_end = m_screens.end();
|
||||||
for (; it != it_end; ++it) {
|
for (; it != it_end; ++it) {
|
||||||
if (*it && (*it)->rootWindow() == window_root)
|
if (*it && (*it)->rootWindow() == window_root)
|
||||||
return *it;
|
return *it;
|
||||||
|
@ -1058,9 +1062,9 @@ void Fluxbox::removeGroupSearch(Window window) {
|
||||||
|
|
||||||
/// restarts fluxbox
|
/// restarts fluxbox
|
||||||
void Fluxbox::restart(const char *prog) {
|
void Fluxbox::restart(const char *prog) {
|
||||||
shutdown();
|
|
||||||
|
|
||||||
m_restarting = true;
|
shutdown();
|
||||||
|
m_state.restarting = true;
|
||||||
|
|
||||||
if (prog && *prog != '\0') {
|
if (prog && *prog != '\0') {
|
||||||
m_restart_argument = prog;
|
m_restart_argument = prog;
|
||||||
|
@ -1072,11 +1076,11 @@ void Fluxbox::restart(const char *prog) {
|
||||||
// already. trying to cleanup over a shaky xserver connection is pointless and
|
// already. trying to cleanup over a shaky xserver connection is pointless and
|
||||||
// might lead to hangups.
|
// might lead to hangups.
|
||||||
void Fluxbox::shutdown(int x_wants_down) {
|
void Fluxbox::shutdown(int x_wants_down) {
|
||||||
if (m_shutdown)
|
if (m_state.shutdown)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Display *dpy = FbTk::App::instance()->display();
|
Display *dpy = FbTk::App::instance()->display();
|
||||||
m_shutdown = true;
|
m_state.shutdown = true;
|
||||||
|
|
||||||
#ifdef HAVE_ALARM
|
#ifdef HAVE_ALARM
|
||||||
// give ourself 2 seconds (randomly picked randon number) to shutdown
|
// give ourself 2 seconds (randomly picked randon number) to shutdown
|
||||||
|
@ -1088,7 +1092,7 @@ void Fluxbox::shutdown(int x_wants_down) {
|
||||||
XSetInputFocus(dpy, PointerRoot, None, CurrentTime);
|
XSetInputFocus(dpy, PointerRoot, None, CurrentTime);
|
||||||
|
|
||||||
if (x_wants_down == 0) {
|
if (x_wants_down == 0) {
|
||||||
STLUtil::forAll(m_screen_list, mem_fun(&BScreen::shutdown));
|
STLUtil::forAll(m_screens, mem_fun(&BScreen::shutdown));
|
||||||
sync(false);
|
sync(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1107,8 +1111,8 @@ void Fluxbox::save_rc() {
|
||||||
cerr<<_FB_CONSOLETEXT(Fluxbox, BadRCFile, "rc filename is invalid!", "Bad settings file")<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, BadRCFile, "rc filename is invalid!", "Bad settings file")<<endl;
|
||||||
|
|
||||||
|
|
||||||
ScreenList::iterator it = m_screen_list.begin();
|
ScreenList::iterator it = m_screens.begin();
|
||||||
ScreenList::iterator it_end = m_screen_list.end();
|
ScreenList::iterator it_end = m_screens.end();
|
||||||
for (; it != it_end; ++it) {
|
for (; it != it_end; ++it) {
|
||||||
BScreen *screen = *it;
|
BScreen *screen = *it;
|
||||||
|
|
||||||
|
@ -1143,14 +1147,14 @@ void Fluxbox::save_rc() {
|
||||||
|
|
||||||
/// @return filename of resource file
|
/// @return filename of resource file
|
||||||
string Fluxbox::getRcFilename() {
|
string Fluxbox::getRcFilename() {
|
||||||
if (m_rc_file.empty())
|
if (m_config.file.empty())
|
||||||
return getDefaultDataFilename(RC_INIT_FILE);
|
return getDefaultDataFilename(RC_INIT_FILE);
|
||||||
return m_rc_file;
|
return m_config.file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Provides default filename of data file
|
/// Provides default filename of data file
|
||||||
string Fluxbox::getDefaultDataFilename(const char *name) const {
|
string Fluxbox::getDefaultDataFilename(const char *name) const {
|
||||||
return m_RC_PATH + string("/") + name;
|
return m_config.path + string("/") + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// loads resources
|
/// loads resources
|
||||||
|
@ -1171,20 +1175,20 @@ void Fluxbox::load_rc() {
|
||||||
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "")<<": "<<DEFAULT_INITFILE<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_rc_menufile->empty())
|
if (m_config.menu_file->empty())
|
||||||
m_rc_menufile.setDefaultValue();
|
m_config.menu_file.setDefaultValue();
|
||||||
|
|
||||||
FbTk::Transparent::usePseudoTransparent(*m_rc_pseudotrans);
|
FbTk::Transparent::usePseudoTransparent(*m_config.pseudotrans);
|
||||||
|
|
||||||
if (m_rc_slitlistfile->empty()) {
|
if (m_config.slit_file->empty()) {
|
||||||
string filename = getDefaultDataFilename("slitlist");
|
string filename = getDefaultDataFilename("slitlist");
|
||||||
m_rc_slitlistfile.setFromString(filename.c_str());
|
m_config.slit_file.setFromString(filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
*m_rc_colors_per_channel = FbTk::Util::clamp(*m_rc_colors_per_channel, 2, 6);
|
*m_config.colors_per_channel = FbTk::Util::clamp(*m_config.colors_per_channel, 2, 6);
|
||||||
|
|
||||||
if (m_rc_stylefile->empty())
|
if (m_config.style_file->empty())
|
||||||
*m_rc_stylefile = DEFAULTSTYLE;
|
*m_config.style_file = DEFAULTSTYLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fluxbox::load_rc(BScreen &screen) {
|
void Fluxbox::load_rc(BScreen &screen) {
|
||||||
|
@ -1198,7 +1202,6 @@ void Fluxbox::load_rc(BScreen &screen) {
|
||||||
if (database==0)
|
if (database==0)
|
||||||
database = XrmGetFileDatabase(DEFAULT_INITFILE);
|
database = XrmGetFileDatabase(DEFAULT_INITFILE);
|
||||||
|
|
||||||
|
|
||||||
screen.removeWorkspaceNames();
|
screen.removeWorkspaceNames();
|
||||||
|
|
||||||
std::string screen_number = FbTk::StringUtil::number2String(screen.screenNumber());
|
std::string screen_number = FbTk::StringUtil::number2String(screen.screenNumber());
|
||||||
|
@ -1252,14 +1255,14 @@ void Fluxbox::reconfigure() {
|
||||||
|
|
||||||
void Fluxbox::real_reconfigure() {
|
void Fluxbox::real_reconfigure() {
|
||||||
|
|
||||||
FbTk::Transparent::usePseudoTransparent(*m_rc_pseudotrans);
|
FbTk::Transparent::usePseudoTransparent(*m_config.pseudotrans);
|
||||||
|
|
||||||
ScreenList::iterator screen_it = m_screen_list.begin();
|
ScreenList::iterator screen_it = m_screens.begin();
|
||||||
ScreenList::iterator screen_it_end = m_screen_list.end();
|
ScreenList::iterator screen_it_end = m_screens.end();
|
||||||
for (; screen_it != screen_it_end; ++screen_it)
|
for (; screen_it != screen_it_end; ++screen_it)
|
||||||
load_rc(*(*screen_it));
|
load_rc(*(*screen_it));
|
||||||
|
|
||||||
STLUtil::forAll(m_screen_list, mem_fun(&BScreen::reconfigure));
|
STLUtil::forAll(m_screens, mem_fun(&BScreen::reconfigure));
|
||||||
m_key->reconfigure();
|
m_key->reconfigure();
|
||||||
STLUtil::forAll(m_atomhandler, mem_fun(&AtomHandler::reconfigure));
|
STLUtil::forAll(m_atomhandler, mem_fun(&AtomHandler::reconfigure));
|
||||||
}
|
}
|
||||||
|
@ -1267,10 +1270,10 @@ void Fluxbox::real_reconfigure() {
|
||||||
BScreen *Fluxbox::findScreen(int id) {
|
BScreen *Fluxbox::findScreen(int id) {
|
||||||
|
|
||||||
BScreen* result = 0;
|
BScreen* result = 0;
|
||||||
ScreenList::iterator it = find_if(m_screen_list.begin(), m_screen_list.end(),
|
ScreenList::iterator it = find_if(m_screens.begin(), m_screens.end(),
|
||||||
FbTk::CompareEqual<BScreen>(&BScreen::screenNumber, id));
|
FbTk::CompareEqual<BScreen>(&BScreen::screenNumber, id));
|
||||||
|
|
||||||
if (it != m_screen_list.end())
|
if (it != m_screens.end())
|
||||||
result = *it;
|
result = *it;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -1284,8 +1287,8 @@ void Fluxbox::timed_reconfigure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fluxbox::revertFocus() {
|
void Fluxbox::revertFocus() {
|
||||||
bool revert = m_keyscreen && !m_showing_dialog;
|
|
||||||
|
|
||||||
|
bool revert = m_active_screen.key && !m_showing_dialog;
|
||||||
if (revert) {
|
if (revert) {
|
||||||
// see if there are any more focus events in the queue
|
// see if there are any more focus events in the queue
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
@ -1301,12 +1304,12 @@ void Fluxbox::revertFocus() {
|
||||||
// we only want to revert focus if it's left dangling, as some other
|
// we only want to revert focus if it's left dangling, as some other
|
||||||
// application may have set the focus to an unmanaged window
|
// application may have set the focus to an unmanaged window
|
||||||
if (win != None && win != PointerRoot && !searchWindow(win) &&
|
if (win != None && win != PointerRoot && !searchWindow(win) &&
|
||||||
win != m_keyscreen->rootWindow().window())
|
win != m_active_screen.key->rootWindow().window())
|
||||||
revert = false;
|
revert = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (revert)
|
if (revert)
|
||||||
FocusControl::revertFocus(*m_keyscreen);
|
FocusControl::revertFocus(*m_active_screen.key);
|
||||||
else
|
else
|
||||||
FocusControl::setFocusedWindow(0);
|
FocusControl::setFocusedWindow(0);
|
||||||
}
|
}
|
||||||
|
@ -1360,17 +1363,4 @@ void Fluxbox::workspaceAreaChanged(BScreen &screen) {
|
||||||
CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkarea, screen));
|
CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkarea, screen));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Fluxbox::haveShape() const {
|
|
||||||
return s_have_shape;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Fluxbox::shapeEventbase() const {
|
|
||||||
return s_shape_eventbase;
|
|
||||||
}
|
|
||||||
|
|
||||||
Fluxbox* Fluxbox::instance() {
|
|
||||||
return s_singleton;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
188
src/fluxbox.hh
188
src/fluxbox.hh
|
@ -34,16 +34,6 @@
|
||||||
|
|
||||||
#include <X11/Xresource.h>
|
#include <X11/Xresource.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif // HAVE_CONFIG_H
|
|
||||||
|
|
||||||
#ifdef HAVE_CSTDIO
|
|
||||||
#include <cstdio>
|
|
||||||
#else
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TIME_WITH_SYS_TIME
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -60,6 +50,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
class AtomHandler;
|
class AtomHandler;
|
||||||
class FluxboxWindow;
|
class FluxboxWindow;
|
||||||
|
@ -75,61 +66,71 @@ class FbAtoms;
|
||||||
class Fluxbox : public FbTk::App,
|
class Fluxbox : public FbTk::App,
|
||||||
private FbTk::SignalTracker {
|
private FbTk::SignalTracker {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef std::list<BScreen *> ScreenList;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
OPT_TOOLBAR = 1 << 0,
|
||||||
|
OPT_SLIT = 1 << 1
|
||||||
|
};
|
||||||
|
|
||||||
|
/// obsolete
|
||||||
|
enum TabsAttachArea{ATTACH_AREA_WINDOW= 0, ATTACH_AREA_TITLEBAR};
|
||||||
|
|
||||||
|
|
||||||
|
static Fluxbox *instance();
|
||||||
|
|
||||||
|
|
||||||
Fluxbox(int argc, char **argv,
|
Fluxbox(int argc, char **argv,
|
||||||
const std::string& dpy_name,
|
const std::string& dpy_name,
|
||||||
const std::string& rc_path, const std::string& rc_filename,
|
const std::string& rc_path, const std::string& rc_filename,
|
||||||
bool xsync = false);
|
bool xsync = false);
|
||||||
virtual ~Fluxbox();
|
virtual ~Fluxbox();
|
||||||
|
|
||||||
static Fluxbox *instance();
|
|
||||||
|
|
||||||
/// main event loop
|
/// main event loop
|
||||||
void eventLoop();
|
void eventLoop();
|
||||||
bool validateWindow(Window win) const;
|
|
||||||
bool validateClient(const WinClient *client) const;
|
|
||||||
|
|
||||||
void grab();
|
void grab();
|
||||||
void ungrab();
|
void ungrab();
|
||||||
Keys *keys() { return m_key.get(); }
|
Keys *keys() { return m_key.get(); }
|
||||||
Atom getFluxboxPidAtom() const { return m_fluxbox_pid; }
|
Atom getFluxboxPidAtom() const { return m_fluxbox_pid; }
|
||||||
|
|
||||||
// Not currently implemented until we decide how it'll be used
|
|
||||||
//WinClient *searchGroup(Window);
|
|
||||||
WinClient *searchWindow(Window);
|
|
||||||
|
|
||||||
void initScreen(BScreen *screen);
|
void initScreen(BScreen *screen);
|
||||||
BScreen *searchScreen(Window w);
|
|
||||||
|
|
||||||
unsigned int getDoubleClickInterval() const { return *m_rc_double_click_interval; }
|
WinClient *searchWindow(Window);
|
||||||
|
BScreen *searchScreen(Window w);
|
||||||
|
bool validateWindow(Window win) const;
|
||||||
|
bool validateClient(const WinClient *client) const;
|
||||||
|
|
||||||
|
// Not currently implemented until we decide how it'll be used
|
||||||
|
//WinClient *searchGroup(Window);
|
||||||
|
|
||||||
Time getLastTime() const { return m_last_time; }
|
Time getLastTime() const { return m_last_time; }
|
||||||
|
|
||||||
AtomHandler *getAtomHandler(const std::string &name);
|
AtomHandler *getAtomHandler(const std::string &name);
|
||||||
void addAtomHandler(AtomHandler *atomh);
|
void addAtomHandler(AtomHandler *atomh);
|
||||||
void removeAtomHandler(AtomHandler *atomh);
|
void removeAtomHandler(AtomHandler *atomh);
|
||||||
|
|
||||||
/// obsolete
|
|
||||||
enum TabsAttachArea{ATTACH_AREA_WINDOW= 0, ATTACH_AREA_TITLEBAR};
|
|
||||||
|
|
||||||
|
std::string getDefaultDataFilename(const char *name) const;
|
||||||
|
|
||||||
bool getIgnoreBorder() const { return *m_rc_ignoreborder; }
|
bool &getPseudoTrans() { return *m_config.pseudotrans; }
|
||||||
bool &getPseudoTrans() { return *m_rc_pseudotrans; }
|
bool getIgnoreBorder() const { return *m_config.ignore_border; }
|
||||||
|
Fluxbox::TabsAttachArea getTabsAttachArea() const { return *m_config.tabs_attach_area; }
|
||||||
Fluxbox::TabsAttachArea getTabsAttachArea() const { return *m_rc_tabs_attach_area; }
|
const std::string &getStyleFilename() const { return *m_config.style_file; }
|
||||||
const std::string &getStyleFilename() const { return *m_rc_stylefile; }
|
const std::string &getStyleOverlayFilename() const { return *m_config.overlay_file; }
|
||||||
const std::string &getStyleOverlayFilename() const { return *m_rc_styleoverlayfile; }
|
const std::string &getMenuFilename() const { return *m_config.menu_file; }
|
||||||
|
const std::string &getSlitlistFilename() const { return *m_config.slit_file; }
|
||||||
const std::string &getMenuFilename() const { return *m_rc_menufile; }
|
const std::string &getAppsFilename() const { return *m_config.apps_file; }
|
||||||
const std::string &getSlitlistFilename() const { return *m_rc_slitlistfile; }
|
const std::string &getKeysFilename() const { return *m_config.key_file; }
|
||||||
const std::string &getAppsFilename() const { return *m_rc_appsfile; }
|
int colorsPerChannel() const { return *m_config.colors_per_channel; }
|
||||||
const std::string &getKeysFilename() const { return *m_rc_keyfile; }
|
int getTabsPadding() const { return *m_config.tabs_padding; }
|
||||||
int colorsPerChannel() const { return *m_rc_colors_per_channel; }
|
unsigned int getDoubleClickInterval() const { return *m_config.double_click_interval; }
|
||||||
int getTabsPadding() const { return *m_rc_tabs_padding; }
|
time_t getAutoRaiseDelay() const { return *m_config.auto_raise_delay; }
|
||||||
|
unsigned int getCacheLife() const { return *m_config.cache_life * 60000; }
|
||||||
|
unsigned int getCacheMax() const { return *m_config.cache_max; }
|
||||||
time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; }
|
|
||||||
|
|
||||||
unsigned int getCacheLife() const { return *m_rc_cache_life * 60000; }
|
|
||||||
unsigned int getCacheMax() const { return *m_rc_cache_max; }
|
|
||||||
|
|
||||||
|
|
||||||
void maskWindowEvents(Window w, FluxboxWindow *bw)
|
void maskWindowEvents(Window w, FluxboxWindow *bw)
|
||||||
|
@ -137,7 +138,7 @@ public:
|
||||||
|
|
||||||
void shutdown(int x_wants_down = 0);
|
void shutdown(int x_wants_down = 0);
|
||||||
void load_rc(BScreen &scr);
|
void load_rc(BScreen &scr);
|
||||||
void saveStyleFilename(const char *val) { m_rc_stylefile = (val == 0 ? "" : val); }
|
void saveStyleFilename(const char *val) { m_config.style_file = (val == 0 ? "" : val); }
|
||||||
void saveWindowSearch(Window win, WinClient *winclient);
|
void saveWindowSearch(Window win, WinClient *winclient);
|
||||||
// some windows relate to the group, not the client, so we record separately
|
// some windows relate to the group, not the client, so we record separately
|
||||||
// searchWindow on these windows will give the active client in the group
|
// searchWindow on these windows will give the active client in the group
|
||||||
|
@ -162,25 +163,23 @@ public:
|
||||||
m_showing_dialog = value; if (!value) revertFocus();
|
m_showing_dialog = value; if (!value) revertFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isStartup() const { return m_starting; }
|
bool isStartup() const { return m_state.starting; }
|
||||||
bool isRestarting() const { return m_restarting; }
|
bool isRestarting() const { return m_state.restarting; }
|
||||||
bool isShuttingDown() const { return m_shutdown; }
|
bool isShuttingDown() const { return m_state.shutdown; }
|
||||||
|
|
||||||
const std::string &getRestartArgument() const { return m_restart_argument; }
|
const std::string &getRestartArgument() const { return m_restart_argument; }
|
||||||
|
|
||||||
/// get screen from number
|
/// get screen from number
|
||||||
BScreen *findScreen(int num);
|
BScreen *findScreen(int num);
|
||||||
|
|
||||||
typedef std::list<BScreen *> ScreenList;
|
const ScreenList screenList() const { return m_screens; }
|
||||||
const ScreenList screenList() const { return m_screen_list; }
|
|
||||||
|
|
||||||
bool haveShape() const;
|
bool haveShape() const;
|
||||||
int shapeEventbase() const;
|
int shapeEventbase() const;
|
||||||
std::string getDefaultDataFilename(const char *name) const;
|
|
||||||
// screen mouse was in at last key event
|
|
||||||
BScreen *mouseScreen() { return m_mousescreen; }
|
BScreen *mouseScreen() { return m_active_screen.mouse; }
|
||||||
// screen of window that last key event (i.e. focused window) went to
|
BScreen *keyScreen() { return m_active_screen.key; }
|
||||||
BScreen *keyScreen() { return m_keyscreen; }
|
|
||||||
const XEvent &lastEvent() const { return m_last_event; }
|
const XEvent &lastEvent() const { return m_last_event; }
|
||||||
|
|
||||||
AttentionNoticeHandler &attentionHandler() { return m_attention_handler; }
|
AttentionNoticeHandler &attentionHandler() { return m_attention_handler; }
|
||||||
|
@ -188,11 +187,8 @@ public:
|
||||||
private:
|
private:
|
||||||
std::string getRcFilename();
|
std::string getRcFilename();
|
||||||
void load_rc();
|
void load_rc();
|
||||||
|
|
||||||
void real_reconfigure();
|
void real_reconfigure();
|
||||||
|
|
||||||
void handleEvent(XEvent *xe);
|
void handleEvent(XEvent *xe);
|
||||||
|
|
||||||
void handleUnmapNotify(XUnmapEvent &ue);
|
void handleUnmapNotify(XUnmapEvent &ue);
|
||||||
void handleClientMessage(XClientMessageEvent &ce);
|
void handleClientMessage(XClientMessageEvent &ce);
|
||||||
|
|
||||||
|
@ -222,33 +218,53 @@ private:
|
||||||
/// Called when a window layer changes
|
/// Called when a window layer changes
|
||||||
void windowLayerChanged(FluxboxWindow &win);
|
void windowLayerChanged(FluxboxWindow &win);
|
||||||
|
|
||||||
std::auto_ptr<FbAtoms> m_fbatoms;
|
|
||||||
|
|
||||||
FbTk::ResourceManager m_resourcemanager, &m_screen_rm;
|
typedef std::map<Window, WinClient *> WinClientMap;
|
||||||
|
typedef std::map<Window, FluxboxWindow *> WindowMap;
|
||||||
|
typedef std::set<AtomHandler *> AtomHandlerContainer;
|
||||||
|
typedef AtomHandlerContainer::iterator AtomHandlerContainerIt;
|
||||||
|
|
||||||
std::string m_RC_PATH;
|
|
||||||
|
|
||||||
//--- Resources
|
//--- Resources
|
||||||
|
|
||||||
FbTk::Resource<bool> m_rc_ignoreborder;
|
std::auto_ptr<FbAtoms> m_fbatoms;
|
||||||
FbTk::Resource<bool> m_rc_pseudotrans;
|
FbTk::ResourceManager m_resourcemanager;
|
||||||
FbTk::Resource<int> m_rc_colors_per_channel,
|
FbTk::ResourceManager& m_screen_rm;
|
||||||
m_rc_double_click_interval,
|
|
||||||
m_rc_tabs_padding;
|
struct Config {
|
||||||
FbTk::Resource<std::string> m_rc_stylefile,
|
Config(FbTk::ResourceManager& rm, const std::string& path);
|
||||||
m_rc_styleoverlayfile,
|
|
||||||
m_rc_menufile, m_rc_keyfile, m_rc_slitlistfile,
|
std::string path;
|
||||||
m_rc_appsfile;
|
std::string file;
|
||||||
|
|
||||||
|
FbTk::Resource<bool> ignore_border;
|
||||||
|
FbTk::Resource<bool> pseudotrans;
|
||||||
|
FbTk::Resource<int> colors_per_channel;
|
||||||
|
FbTk::Resource<int> double_click_interval;
|
||||||
|
FbTk::Resource<int> tabs_padding;
|
||||||
|
|
||||||
|
FbTk::Resource<std::string> style_file;
|
||||||
|
FbTk::Resource<std::string> overlay_file;
|
||||||
|
FbTk::Resource<std::string> menu_file;
|
||||||
|
FbTk::Resource<std::string> key_file;
|
||||||
|
FbTk::Resource<std::string> slit_file;
|
||||||
|
FbTk::Resource<std::string> apps_file;
|
||||||
|
|
||||||
|
FbTk::Resource<TabsAttachArea> tabs_attach_area;
|
||||||
|
FbTk::Resource<unsigned int> cache_life;
|
||||||
|
FbTk::Resource<unsigned int> cache_max;
|
||||||
|
FbTk::Resource<time_t> auto_raise_delay;
|
||||||
|
} m_config;
|
||||||
|
|
||||||
|
|
||||||
FbTk::Resource<TabsAttachArea> m_rc_tabs_attach_area;
|
std::auto_ptr<Keys> m_key;
|
||||||
FbTk::Resource<unsigned int> m_rc_cache_life, m_rc_cache_max;
|
AtomHandlerContainer m_atomhandler;
|
||||||
FbTk::Resource<time_t> m_rc_auto_raise_delay;
|
AttentionNoticeHandler m_attention_handler;
|
||||||
|
|
||||||
typedef std::map<Window, WinClient *> WinClientMap;
|
ScreenList m_screens;
|
||||||
WinClientMap m_window_search;
|
WinClientMap m_window_search;
|
||||||
typedef std::map<Window, FluxboxWindow *> WindowMap;
|
|
||||||
WindowMap m_window_search_group;
|
WindowMap m_window_search_group;
|
||||||
|
|
||||||
// A window is the group leader, which can map to several
|
// A window is the group leader, which can map to several
|
||||||
// WinClients in the group, it is *not* fluxbox's concept of groups
|
// WinClients in the group, it is *not* fluxbox's concept of groups
|
||||||
// See ICCCM section 4.1.11
|
// See ICCCM section 4.1.11
|
||||||
|
@ -256,43 +272,37 @@ private:
|
||||||
// will have it's window being the group index
|
// will have it's window being the group index
|
||||||
std::multimap<Window, WinClient *> m_group_search;
|
std::multimap<Window, WinClient *> m_group_search;
|
||||||
|
|
||||||
ScreenList m_screen_list;
|
|
||||||
|
|
||||||
|
Time m_last_time;
|
||||||
|
XEvent m_last_event;
|
||||||
|
|
||||||
|
Window m_masked;
|
||||||
FluxboxWindow *m_masked_window;
|
FluxboxWindow *m_masked_window;
|
||||||
|
|
||||||
BScreen *m_mousescreen, *m_keyscreen;
|
struct {
|
||||||
|
BScreen* mouse;
|
||||||
|
BScreen* key;
|
||||||
|
} m_active_screen;
|
||||||
|
|
||||||
Atom m_fluxbox_pid;
|
Atom m_fluxbox_pid;
|
||||||
|
|
||||||
bool m_reconfigure_wait;
|
bool m_reconfigure_wait;
|
||||||
Time m_last_time;
|
|
||||||
Window m_masked;
|
|
||||||
std::string m_rc_file; ///< resource filename
|
|
||||||
char **m_argv;
|
char **m_argv;
|
||||||
int m_argc;
|
int m_argc;
|
||||||
|
|
||||||
std::string m_restart_argument; ///< what to restart
|
std::string m_restart_argument; ///< what to restart
|
||||||
|
|
||||||
XEvent m_last_event;
|
|
||||||
|
|
||||||
///< when we execute reconfig command we must wait until next event round
|
///< when we execute reconfig command we must wait until next event round
|
||||||
FbTk::Timer m_reconfig_timer;
|
FbTk::Timer m_reconfig_timer;
|
||||||
FbTk::Timer m_key_reload_timer;
|
FbTk::Timer m_key_reload_timer;
|
||||||
bool m_showing_dialog;
|
bool m_showing_dialog;
|
||||||
|
|
||||||
std::auto_ptr<Keys> m_key;
|
struct {
|
||||||
|
bool starting;
|
||||||
|
bool restarting;
|
||||||
|
bool shutdown;
|
||||||
|
} m_state;
|
||||||
|
|
||||||
typedef std::set<AtomHandler *> AtomHandlerContainer;
|
|
||||||
typedef AtomHandlerContainer::iterator AtomHandlerContainerIt;
|
|
||||||
|
|
||||||
AtomHandlerContainer m_atomhandler;
|
|
||||||
|
|
||||||
bool m_starting;
|
|
||||||
bool m_restarting;
|
|
||||||
bool m_shutdown;
|
|
||||||
int m_server_grabs;
|
int m_server_grabs;
|
||||||
|
|
||||||
AttentionNoticeHandler m_attention_handler;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue