all repos — fluxbox @ acf4326f3cc3451aaf874b0b0777d69be5834e57

custom fork of the fluxbox windowmanager

Use -Wall when --enable-debug and some warning fixes 
+ thanks Jonas Koelker
simonb simonb
commit

acf4326f3cc3451aaf874b0b0777d69be5834e57

parent

f6a072430d4de159e229d6172adc5ba5ae985512

M ChangeLogChangeLog

@@ -1,6 +1,11 @@

(Format: Year/Month/Day) Changes for 0.9.16: *06/04/24: + * Use -Wall when --enable-debug and some warning fixes + (Simon + thanks Jonas Koelker) + configure.in ClockTool.cc main.cc Ewmh.cc Window.cc + PlacementStrategy.hh LayerMenu.hh FbTk/SignalHandler.hh + FbTk/FbWindow.hh * Fix memory leaks & other errors in Menu code (Simon) Screen.cc Slit.cc Toolbar.cc fluxbox.cc MenuCreator.cc FbTk/Menu.cc * Use external tabs by default (Simon)
M configure.inconfigure.in

@@ -320,7 +320,7 @@ AC_ARG_ENABLE(debug,

[ --enable-debug include verbose debugging code [default=no]], if test x$enableval = "xyes"; then AC_MSG_RESULT([yes]) - DEBUG="-DDEBUG" + DEBUG="-DDEBUG -Wall" else AC_MSG_RESULT([no]) fi,
M src/ClockTool.ccsrc/ClockTool.cc

@@ -257,7 +257,7 @@ if( time_string_len == 0 || m_button.text() == time_string)

return; m_button.setText(time_string); - int new_width = m_theme.font().textWidth(time_string, time_string_len) + 2; + unsigned int new_width = m_theme.font().textWidth(time_string, time_string_len) + 2; if (new_width > m_button.width()) { resize(new_width, m_button.height()); resizeSig().notify();
M src/Ewmh.ccsrc/Ewmh.cc

@@ -267,8 +267,8 @@

if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL, &ret_type, &fmt, &nitems, &bytes_after, (unsigned char **) &data) && data) { - unsigned int desktop = static_cast<unsigned int>(*data); - if (desktop == 0xFFFFFFFF && !win.isStuck()) + unsigned int desktop = static_cast<long>(*data); + if (desktop == -1 && !win.isStuck()) win.stick(); else win.setWorkspace(desktop);

@@ -634,7 +634,7 @@ void Ewmh::updateWorkspace(FluxboxWindow &win) {

long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); if (win.isStuck()) - workspace = 0xFFFFFFFF; // appear on all desktops/workspaces + workspace = -1; // appear on all desktops/workspaces FluxboxWindow::ClientList::iterator it = win.clientList().begin(); FluxboxWindow::ClientList::iterator it_end = win.clientList().end();

@@ -661,7 +661,7 @@ FluxboxWindow *fbwin = winclient->fbwindow();

// if it's stick, make sure it is stuck. // otherwise, make sure it isn't stuck - if (ce.data.l[0] == 0xFFFFFFFF) { + if (ce.data.l[0] == -1) { if (!fbwin->isStuck()) fbwin->stick(); return true;
M src/FbTk/FbWindow.hhsrc/FbTk/FbWindow.hh

@@ -266,6 +266,7 @@ /// Interface class to render FbWindow foregrounds.

class FbWindowRenderer { public: virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0; + virtual ~FbWindowRenderer() { } };
M src/FbTk/SignalHandler.hhsrc/FbTk/SignalHandler.hh

@@ -33,6 +33,7 @@ /// Use this to catch system signals

class SignalEventHandler { public: virtual void handleSignal(int signum) = 0; + virtual ~SignalEventHandler() { } }; /// Handles system signals, singleton.
M src/LayerMenu.hhsrc/LayerMenu.hh

@@ -34,6 +34,7 @@ class LayerObject {

public: virtual void moveToLayer(int layer_number) = 0; virtual int layerNumber() const = 0; + virtual ~LayerObject() { } };
M src/PlacementStrategy.hhsrc/PlacementStrategy.hh

@@ -40,6 +40,7 @@ */

virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist, const FluxboxWindow &win, int &place_x, int &place_y) = 0; + virtual ~PlacementStrategy() { } }; #endif // PLACEMENTSTRATEGY_HH
M src/Window.ccsrc/Window.cc

@@ -3378,14 +3378,13 @@ int bottom = orig_top + height() + 2 * borderW;

// test against tabs too bool i_have_tabs = frame().externalTabMode(); - int xoff,yoff,woff,hoff; + int xoff = 0, yoff = 0, woff = 0, hoff = 0; if (i_have_tabs) { xoff = xOffset(); yoff = yOffset(); woff = widthOffset(); hoff = heightOffset(); } - ///////////////////////////////////// // begin by checking the screen (or Xinerama head) edges
M src/main.ccsrc/main.cc

@@ -304,9 +304,10 @@ if (errbuf != 0)

cerr.rdbuf(errbuf); if (restarting) { - if (restart_argument.c_str()) { - execlp(restart_argument.c_str(), restart_argument.c_str(), 0); - perror(restart_argument.c_str()); + const char *arg = restart_argument.c_str(); + if (arg) { + execlp(arg, arg, (char *) NULL); + perror(arg); } // fall back in case the above execlp doesn't work