all repos — fluxbox @ 884db973bb7d11252581e7bc10ce172892986b67

custom fork of the fluxbox windowmanager

cosmetic fixes: removed redundant ';' + some whitespaces
Mathias Gumz akira at fluxbox dot org
commit

884db973bb7d11252581e7bc10ce172892986b67

parent

4663a9591e08b554f82366cdd8e9075b0a6fbe55

M nls/fluxbox-nls.hhnls/fluxbox-nls.hh

@@ -253,6 +253,6 @@ dummy_not_used = 0 // just for the end

}; // end enum -}; // end namespace FBNLS +} // end namespace FBNLS #endif // FLUXBOX_NLS_HH
M src/ButtonTool.hhsrc/ButtonTool.hh

@@ -31,7 +31,7 @@

namespace FbTk { class Button; class ImageControl; -}; +} class ButtonTool: public GenericTool { public:
M src/ClientMenu.ccsrc/ClientMenu.cc

@@ -77,7 +77,7 @@ private:

Focusable &m_client; }; -}; // end anonymous namespace +} // end anonymous namespace ClientMenu::ClientMenu(BScreen &screen, Focusables &clients, bool listen_for_iconlist_changes):
M src/CurrentWindowCmd.ccsrc/CurrentWindowCmd.cc

@@ -109,7 +109,7 @@ REGISTER_COMMAND_PARSER(movetabright, createCurrentWindowCmd, void);

REGISTER_COMMAND_PARSER(detachclient, createCurrentWindowCmd, void); REGISTER_COMMAND_PARSER(windowmenu, createCurrentWindowCmd, void); -}; // end anonymous namespace +} // end anonymous namespace void WindowHelperCmd::execute() { if (WindowCmd<void>::window() || FocusControl::focusedFbWindow())

@@ -201,7 +201,7 @@

REGISTER_COMMAND_PARSER(activate, parseFocusCmd, void); REGISTER_COMMAND_PARSER(focus, parseFocusCmd, void); -}; // end anonymous namespace +} // end anonymous namespace void SetHeadCmd::real_execute() { int num = m_head;
M src/Ewmh.ccsrc/Ewmh.cc

@@ -288,7 +288,7 @@

winclient.setIcon(icon); } -}; // end anonymous namespace +} // end anonymous namespace class Ewmh::EwmhAtoms { public:

@@ -1535,3 +1535,4 @@ XA_CARDINAL, 32, PropModeReplace,

(unsigned char *)extents, 4); } } +
M src/FbCommands.ccsrc/FbCommands.cc

@@ -466,7 +466,7 @@ return;

FbTk::FbWindow *win = new CommandDialog(*screen, "Type resource name and the value", "SetResourceValue "); win->show(); -}; +} REGISTER_UNTRUSTED_COMMAND_WITH_ARGS(bindkey, FbCommands::BindKeyCmd, void);
M src/FbTk/Color.ccsrc/FbTk/Color.cc

@@ -37,7 +37,7 @@ inline unsigned char maxValue(unsigned short colval) {

return colval == 65535 ? 0xFF : static_cast<unsigned char>(colval/0xFF); } -}; +} namespace FbTk {

@@ -184,4 +184,4 @@ m_green = green;

m_blue = blue; } -}; +}
M src/FbTk/FbPixmap.ccsrc/FbTk/FbPixmap.cc

@@ -66,7 +66,7 @@ }

} } -}; // end of anonymous namespace +} // end of anonymous namespace FbPixmap::FbPixmap():m_pm(0), m_width(0), m_height(0),
M src/FbTk/FbWindow.ccsrc/FbTk/FbWindow.cc

@@ -87,7 +87,7 @@

create(RootWindow(display(), screen_num), x, y, width, height, eventmask, override_redirect, save_unders, depth, class_type); -}; +} FbWindow::FbWindow(const FbWindow &parent, int x, int y, unsigned int width, unsigned int height,

@@ -105,7 +105,7 @@ create(parent.window(), x, y, width, height, eventmask,

override_redirect, save_unders, depth, class_type); -}; +} FbWindow::FbWindow(Window client): FbDrawable(),

@@ -686,4 +686,4 @@ bool operator == (Window win, const FbWindow &fbwin) {

return win == fbwin.window(); } -}; +}
M src/FbTk/FileUtil.hhsrc/FbTk/FileUtil.hh

@@ -58,7 +58,7 @@

/// copies file 'from' to 'to' bool copyFile(const char* from, const char* to); -}; // end of File namespace +} // end of File namespace /// Wrapper class for DIR * routines class Directory : private FbTk::NotCopyable {
M src/FbTk/Font.ccsrc/FbTk/Font.cc

@@ -100,7 +100,7 @@ font.setShadowOffY(2);

font.setShadowOffX(2); } -}; // end nameless namespace +} // end nameless namespace

@@ -301,5 +301,5 @@ m_fontimp->drawText(w, screen, gc, text, len, x, y, orient);

} -}; +}
M src/FbTk/Image.ccsrc/FbTk/Image.cc

@@ -59,7 +59,7 @@ FbTk::ImageXPM xpm_loader;

#endif -}; // end of anonymous namespace +} // end of anonymous namespace namespace FbTk {
M src/FbTk/Image.hhsrc/FbTk/Image.hh

@@ -50,7 +50,7 @@ /// adds a path to search images from

void removeAllSearchPaths(); /// locates an image in the search path std::string locateFile(const std::string &filename); -}; +} /// common interface for all image classes class ImageBase {
M src/FbTk/ImageControl.ccsrc/FbTk/ImageControl.cc

@@ -94,7 +94,7 @@ r = (r + q) >> 1;

} } -}; // end anonymous namespace +} // end anonymous namespace struct ImageControl::Cache { Pixmap pixmap;
M src/FbTk/ImageImlib2.ccsrc/FbTk/ImageImlib2.cc

@@ -35,7 +35,7 @@ typedef ScreenImlibContextContainer::iterator ScreenImlibContext;

ScreenImlibContextContainer contexts; -}; // anon namespace +} // anon namespace namespace FbTk {
M src/FbTk/KeyUtil.ccsrc/FbTk/KeyUtil.cc

@@ -55,7 +55,7 @@ {"CTRL", ControlMask},

{0, 0} }; -}; +} namespace FbTk {
M src/FbTk/LogicCommands.ccsrc/FbTk/LogicCommands.cc

@@ -77,7 +77,7 @@ REGISTER_COMMAND_PARSER(and, parseLogicCommand, bool);

REGISTER_COMMAND_PARSER(or, parseLogicCommand, bool); REGISTER_COMMAND_PARSER(xor, parseLogicCommand, bool); -}; // end anonymous namespace +} // end anonymous namespace Command<void> *IfCommand::parse(const std::string &command, const std::string &args, bool trusted) {
M src/FbTk/MacroCommand.ccsrc/FbTk/MacroCommand.cc

@@ -66,7 +66,7 @@

REGISTER_COMMAND_PARSER(macrocmd, parseMacroCmd, void); REGISTER_COMMAND_PARSER(togglecmd, parseMacroCmd, void); -}; // end anonymous namespace +} // end anonymous namespace void MacroCommand::add(RefCount<Command<void> > &com) { m_commandlist.push_back(com);
M src/FbTk/MultLayers.hhsrc/FbTk/MultLayers.hh

@@ -67,5 +67,5 @@ std::vector<XLayer *> m_layers;

int m_lock; }; -}; +} #endif // FBTK_MULTLAYERS_HH
M src/FbTk/Observer.ccsrc/FbTk/Observer.cc

@@ -28,4 +28,4 @@ Observer::~Observer() {

Subject::removeObserver(this); // make sure no subject has this observer attached } -}; +}
M src/FbTk/Parser.ccsrc/FbTk/Parser.cc

@@ -23,4 +23,4 @@ #include "Parser.hh"

namespace FbTk { const Parser::Item Parser::s_empty_item("", ""); -}; +}
M src/FbTk/Shape.ccsrc/FbTk/Shape.cc

@@ -103,7 +103,7 @@

// unfortunately, we need a separate pixmap per screen std::vector<CornerPixmaps> s_corners; -}; // end of anonymous namespace +} // end of anonymous namespace Shape::Shape(FbWindow &win, int shapeplaces): m_win(&win),
M src/FbTk/SignalHandler.ccsrc/FbTk/SignalHandler.cc

@@ -36,7 +36,7 @@ static SignalHandler singleton;

return singleton; } -bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh, +bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh, SignalEventHandler **oldhandler_ret) { // must be less than NSIG if (signum >= NSIG)

@@ -45,18 +45,18 @@

// get old signal handler for this signum if (oldhandler_ret != 0) *oldhandler_ret = s_signal_handler[signum]; - + struct sigaction sa; // set callback sa.sa_handler = SignalHandler::handleSignal; sigemptyset (&sa.sa_mask); sa.sa_flags = 0; - + if (sigaction(signum, &sa, 0) == -1) return false; - + s_signal_handler[signum] = eh; - + return true; }

@@ -69,4 +69,5 @@ s_signal_handler[signum]->handleSignal(signum);

} } -}; +} +
M src/FbTk/Transparent.ccsrc/FbTk/Transparent.cc

@@ -103,7 +103,7 @@

return alpha_pic; } #endif // HAVE_XRENDER -}; +} namespace FbTk {
M src/FbTk/XFontImp.ccsrc/FbTk/XFontImp.cc

@@ -410,4 +410,4 @@

return m_rotfonts[orient] != 0; } -}; +}
M src/FbTk/XmbFontImp.ccsrc/FbTk/XmbFontImp.cc

@@ -158,7 +158,8 @@

return fs; } -}; +} + namespace FbTk { XmbFontImp::XmbFontImp(const char *filename, bool utf8) : m_fontset(0), m_setextents(0), m_utf8mode(utf8) {
M src/FocusControl.ccsrc/FocusControl.cc

@@ -62,20 +62,20 @@ return true; // for now, we only cycle through the current workspace

return false; // else don't skip } -}; // end anonymous namespace - +} // end anonymous namespace + FocusControl::FocusControl(BScreen &screen): m_screen(screen), - m_focus_model(screen.resourceManager(), - CLICKFOCUS, - screen.name()+".focusModel", + m_focus_model(screen.resourceManager(), + CLICKFOCUS, + screen.name()+".focusModel", screen.altName()+".FocusModel"), - m_tab_focus_model(screen.resourceManager(), - CLICKTABFOCUS, - screen.name()+".tabFocusModel", + m_tab_focus_model(screen.resourceManager(), + CLICKTABFOCUS, + screen.name()+".tabFocusModel", screen.altName()+".TabFocusModel"), - m_focus_new(screen.resourceManager(), true, - screen.name()+".focusNewWindows", + m_focus_new(screen.resourceManager(), true, + screen.name()+".focusNewWindows", screen.altName()+".FocusNewWindows"), m_focused_list(screen), m_creation_order_list(screen), m_focused_win_list(screen), m_creation_order_win_list(screen),

@@ -85,7 +85,7 @@ m_cycling_last(0),

m_ignore_mouse_x(-1), m_ignore_mouse_y(-1) { m_cycling_window = m_focused_list.clientList().end(); - + } void FocusControl::cycleFocus(const FocusableList &window_list,

@@ -252,7 +252,7 @@ if (m_screen.isShuttingdown()) return 0;

if (workspace < 0 || workspace >= (int) m_screen.numberOfWorkspaces()) return m_focused_list.clientList().front(); - Focusables::iterator it = m_focused_list.clientList().begin(); + Focusables::iterator it = m_focused_list.clientList().begin(); Focusables::iterator it_end = m_focused_list.clientList().end(); for (; it != it_end; ++it) { if ((*it)->fbwindow() && (*it)->acceptsFocus() &&

@@ -307,11 +307,11 @@ // change focus to the window in direction dir from the given window

// we scan through the list looking for the window that is "closest" // in the given direction - + FluxboxWindow *foundwin = 0; int weight = 999999, exposure = 0; // extreme values int borderW = win.frame().window().borderWidth(), - top = win.y() + borderW, + top = win.y() + borderW, bottom = win.y() + win.height() + borderW, left = win.x() + borderW, right = win.x() + win.width() + borderW;

@@ -319,17 +319,17 @@

Workspace::Windows &wins = m_screen.currentWorkspace()->windowList(); Workspace::Windows::iterator it = wins.begin(); for (; it != wins.end(); ++it) { - if ((*it) == &win - || (*it)->isIconic() - || (*it)->isFocusHidden() - || !(*it)->acceptsFocus()) + if ((*it) == &win + || (*it)->isIconic() + || (*it)->isFocusHidden() + || !(*it)->acceptsFocus()) continue; // skip self - + // we check things against an edge, and within the bounds (draw a picture) int edge=0, upper=0, lower=0, oedge=0, oupper=0, olower=0; - int otop = (*it)->y() + borderW, - // 2 * border = border on each side + int otop = (*it)->y() + borderW, + // 2 * border = border on each side obottom = (*it)->y() + (*it)->height() + borderW, oleft = (*it)->x() + borderW, // 2 * border = border on each side

@@ -371,7 +371,7 @@ olower = obottom;

break; } - if (oedge < edge) + if (oedge < edge) continue; // not in the right direction if (olower <= upper || oupper >= lower) {

@@ -396,7 +396,7 @@ }

} // else not improvement } - if (foundwin) + if (foundwin) foundwin->focus(); }

@@ -516,7 +516,7 @@ *

* assumption: client has focus */ void FocusControl::unfocusWindow(WinClient &client, - bool full_revert, + bool full_revert, bool unfocus_frame) { // go up the transient tree looking for a focusable window

@@ -547,8 +547,8 @@ (!client || client->fbwindow() == s_focused_fbwindow))

return; BScreen *screen = client ? &client->screen() : 0; - BScreen *old_screen = - FocusControl::focusedWindow() ? + BScreen *old_screen = + FocusControl::focusedWindow() ? &FocusControl::focusedWindow()->screen() : 0; #ifdef DEBUG

@@ -567,10 +567,10 @@ s_focused_fbwindow->setFocusFlag(false);

if (client && client->fbwindow() && !client->fbwindow()->isIconic()) { // screen should be ok - s_focused_fbwindow = client->fbwindow(); + s_focused_fbwindow = client->fbwindow(); s_focused_window = client; // update focused window s_expecting_focus = 0; - s_focused_fbwindow->setCurrentClient(*client, + s_focused_fbwindow->setCurrentClient(*client, false); // don't set inputfocus s_focused_fbwindow->setFocusFlag(true); // set focus flag

@@ -604,9 +604,9 @@

template<> void FbTk::Resource<FocusControl::FocusModel>:: setFromString(char const *strval) { - if (strcasecmp(strval, "MouseFocus") == 0) + if (strcasecmp(strval, "MouseFocus") == 0) m_value = FocusControl::MOUSEFOCUS; - else if (strcasecmp(strval, "ClickToFocus") == 0) + else if (strcasecmp(strval, "ClickToFocus") == 0) m_value = FocusControl::CLICKFOCUS; else setDefaultValue();

@@ -630,9 +630,11 @@ setFromString(char const *strval) {

if (strcasecmp(strval, "SloppyTabFocus") == 0 ) m_value = FocusControl::MOUSETABFOCUS; - else if (strcasecmp(strval, "ClickToTabFocus") == 0) + else if (strcasecmp(strval, "ClickToTabFocus") == 0) m_value = FocusControl::CLICKTABFOCUS; else setDefaultValue(); } + } // end namespace FbTk +
M src/IconbarTool.ccsrc/IconbarTool.cc

@@ -241,7 +241,7 @@ private:

Focusable &m_win; }; -}; // end anonymous namespace +} // end anonymous namespace IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, FbTk::ThemeProxy<IconbarTheme> &focused_theme,
M src/MenuCreator.ccsrc/MenuCreator.cc

@@ -364,7 +364,7 @@ label = pitem.label();

return true; } -}; // end of anonymous namespace +} // end of anonymous namespace FbMenu *MenuCreator::createMenu(const string &label, int screen_number) { BScreen *screen = Fluxbox::instance()->findScreen(screen_number);
M src/Remember.ccsrc/Remember.cc

@@ -337,7 +337,7 @@ Remember::REM_SAVEONCLOSE));

menu->updateMenu(); return menu; -}; +} // offset is the offset in the string that we start looking from // return true if all ok, false on error

@@ -395,7 +395,7 @@ #endif // DEBUG

tmp_exec_cmd->execute(); delete tmp_exec_cmd; return true; -}; +}

@@ -609,7 +609,7 @@

return 0; } -}; // end anonymous namespace +} // end anonymous namespace /*------------------------------------------------------------------*\ \*------------------------------------------------------------------*/
M src/Remember.hhsrc/Remember.hh

@@ -41,7 +41,7 @@ class Application;

namespace FbTk { class AutoReloadHelper; -}; +} /** * Class Remember is an atomhandler to avoid interfering with
M src/Slit.ccsrc/Slit.cc

@@ -215,7 +215,7 @@ Slit &m_slit;

Slit::Placement m_place; }; -}; // End anonymous namespace +} // End anonymous namespace unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask | EnterWindowMask | LeaveWindowMask | ExposureMask;
M src/ToolFactory.ccsrc/ToolFactory.cc

@@ -66,7 +66,7 @@ private:

Toolbar &m_tbar; }; -}; +} ToolFactory::ToolFactory(BScreen &screen):m_screen(screen), m_clock_theme(screen.screenNumber(), "toolbar.clock", "Toolbar.Clock"),
M src/ToolFactory.hhsrc/ToolFactory.hh

@@ -35,7 +35,7 @@ class Toolbar;

namespace FbTk { class FbWindow; -}; +} /// creates toolbaritems class ToolFactory:private FbTk::NotCopyable {
M src/Toolbar.ccsrc/Toolbar.cc

@@ -177,7 +177,7 @@ Toolbar &m_toolbar;

Toolbar::Placement m_place; }; -}; // end anonymous +} // end anonymous // toolbar frame Toolbar::Frame::Frame(FbTk::EventHandler &evh, int screen_num):
M src/Window.ccsrc/Window.cc

@@ -259,7 +259,7 @@ int m_num;

int m_mode; }; -}; +} int FluxboxWindow::s_num_grabs = 0;
M src/WorkspaceCmd.ccsrc/WorkspaceCmd.cc

@@ -189,7 +189,7 @@ REGISTER_COMMAND_PARSER(prevwindow, parseWindowList, void);

REGISTER_COMMAND_PARSER(prevgroup, parseWindowList, void); REGISTER_COMMAND_PARSER(arrangewindows, parseWindowList, void); -}; // end anonymous namespace +} // end anonymous namespace void AttachCmd::execute() { BScreen *screen = Fluxbox::instance()->keyScreen();

@@ -318,7 +318,7 @@ REGISTER_COMMAND_PARSER(rightworkspace, parseIntCmd, void);

REGISTER_COMMAND_PARSER(leftworkspace, parseIntCmd, void); REGISTER_COMMAND_PARSER(workspace, parseIntCmd, void); -}; // end anonymous namespace +} // end anonymous namespace void NextWorkspaceCmd::execute() { BScreen *screen = Fluxbox::instance()->mouseScreen();
M util/fbsetroot.hhutil/fbsetroot.hh

@@ -27,7 +27,7 @@ namespace FbTk {

class ImageControl; -}; +} class fbsetroot : public FbTk::App { public:
M util/fluxbox-update_configs.ccutil/fluxbox-update_configs.cc

@@ -463,7 +463,7 @@ set<string> modified_files;

// we may want to put a size limit on this cache, so it doesn't grow too big map<string,string> file_cache; -}; +} // returns the contents of the file given, either from the cache or by reading // the file from disk