Use -Wall when --enable-debug and some warning fixes
+ thanks Jonas Koelker
This commit is contained in:
parent
f6a072430d
commit
acf4326f3c
10 changed files with 20 additions and 11 deletions
|
@ -1,6 +1,11 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 0.9.16:
|
Changes for 0.9.16:
|
||||||
*06/04/24:
|
*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)
|
* Fix memory leaks & other errors in Menu code (Simon)
|
||||||
Screen.cc Slit.cc Toolbar.cc fluxbox.cc MenuCreator.cc FbTk/Menu.cc
|
Screen.cc Slit.cc Toolbar.cc fluxbox.cc MenuCreator.cc FbTk/Menu.cc
|
||||||
* Use external tabs by default (Simon)
|
* Use external tabs by default (Simon)
|
||||||
|
|
|
@ -320,7 +320,7 @@ AC_ARG_ENABLE(debug,
|
||||||
[ --enable-debug include verbose debugging code [default=no]],
|
[ --enable-debug include verbose debugging code [default=no]],
|
||||||
if test x$enableval = "xyes"; then
|
if test x$enableval = "xyes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
DEBUG="-DDEBUG"
|
DEBUG="-DDEBUG -Wall"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi,
|
fi,
|
||||||
|
|
|
@ -257,7 +257,7 @@ void ClockTool::updateTime() {
|
||||||
return;
|
return;
|
||||||
m_button.setText(time_string);
|
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()) {
|
if (new_width > m_button.width()) {
|
||||||
resize(new_width, m_button.height());
|
resize(new_width, m_button.height());
|
||||||
resizeSig().notify();
|
resizeSig().notify();
|
||||||
|
|
|
@ -267,8 +267,8 @@ void Ewmh::setupFrame(FluxboxWindow &win) {
|
||||||
if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL,
|
if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL,
|
||||||
&ret_type, &fmt, &nitems, &bytes_after,
|
&ret_type, &fmt, &nitems, &bytes_after,
|
||||||
(unsigned char **) &data) && data) {
|
(unsigned char **) &data) && data) {
|
||||||
unsigned int desktop = static_cast<unsigned int>(*data);
|
unsigned int desktop = static_cast<long>(*data);
|
||||||
if (desktop == 0xFFFFFFFF && !win.isStuck())
|
if (desktop == -1 && !win.isStuck())
|
||||||
win.stick();
|
win.stick();
|
||||||
else
|
else
|
||||||
win.setWorkspace(desktop);
|
win.setWorkspace(desktop);
|
||||||
|
@ -634,7 +634,7 @@ void Ewmh::updateWorkspace(FluxboxWindow &win) {
|
||||||
long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID();
|
long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID();
|
||||||
|
|
||||||
if (win.isStuck())
|
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 = win.clientList().begin();
|
||||||
FluxboxWindow::ClientList::iterator it_end = win.clientList().end();
|
FluxboxWindow::ClientList::iterator it_end = win.clientList().end();
|
||||||
|
@ -661,7 +661,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
|
||||||
|
|
||||||
// if it's stick, make sure it is stuck.
|
// if it's stick, make sure it is stuck.
|
||||||
// otherwise, make sure it isn't stuck
|
// otherwise, make sure it isn't stuck
|
||||||
if (ce.data.l[0] == 0xFFFFFFFF) {
|
if (ce.data.l[0] == -1) {
|
||||||
if (!fbwin->isStuck())
|
if (!fbwin->isStuck())
|
||||||
fbwin->stick();
|
fbwin->stick();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -266,6 +266,7 @@ private:
|
||||||
class FbWindowRenderer {
|
class FbWindowRenderer {
|
||||||
public:
|
public:
|
||||||
virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0;
|
virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0;
|
||||||
|
virtual ~FbWindowRenderer() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace FbTk {
|
||||||
class SignalEventHandler {
|
class SignalEventHandler {
|
||||||
public:
|
public:
|
||||||
virtual void handleSignal(int signum) = 0;
|
virtual void handleSignal(int signum) = 0;
|
||||||
|
virtual ~SignalEventHandler() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Handles system signals, singleton.
|
/// Handles system signals, singleton.
|
||||||
|
|
|
@ -34,6 +34,7 @@ class LayerObject {
|
||||||
public:
|
public:
|
||||||
virtual void moveToLayer(int layer_number) = 0;
|
virtual void moveToLayer(int layer_number) = 0;
|
||||||
virtual int layerNumber() const = 0;
|
virtual int layerNumber() const = 0;
|
||||||
|
virtual ~LayerObject() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ struct PlacementStrategy {
|
||||||
virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist,
|
virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist,
|
||||||
const FluxboxWindow &win,
|
const FluxboxWindow &win,
|
||||||
int &place_x, int &place_y) = 0;
|
int &place_x, int &place_y) = 0;
|
||||||
|
virtual ~PlacementStrategy() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PLACEMENTSTRATEGY_HH
|
#endif // PLACEMENTSTRATEGY_HH
|
||||||
|
|
|
@ -3378,7 +3378,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
|
||||||
|
|
||||||
// test against tabs too
|
// test against tabs too
|
||||||
bool i_have_tabs = frame().externalTabMode();
|
bool i_have_tabs = frame().externalTabMode();
|
||||||
int xoff,yoff,woff,hoff;
|
int xoff = 0, yoff = 0, woff = 0, hoff = 0;
|
||||||
if (i_have_tabs) {
|
if (i_have_tabs) {
|
||||||
xoff = xOffset();
|
xoff = xOffset();
|
||||||
yoff = yOffset();
|
yoff = yOffset();
|
||||||
|
@ -3386,7 +3386,6 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
|
||||||
hoff = heightOffset();
|
hoff = heightOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
// begin by checking the screen (or Xinerama head) edges
|
// begin by checking the screen (or Xinerama head) edges
|
||||||
|
|
||||||
|
|
|
@ -304,9 +304,10 @@ int main(int argc, char **argv) {
|
||||||
cerr.rdbuf(errbuf);
|
cerr.rdbuf(errbuf);
|
||||||
|
|
||||||
if (restarting) {
|
if (restarting) {
|
||||||
if (restart_argument.c_str()) {
|
const char *arg = restart_argument.c_str();
|
||||||
execlp(restart_argument.c_str(), restart_argument.c_str(), 0);
|
if (arg) {
|
||||||
perror(restart_argument.c_str());
|
execlp(arg, arg, (char *) NULL);
|
||||||
|
perror(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fall back in case the above execlp doesn't work
|
// fall back in case the above execlp doesn't work
|
||||||
|
|
Loading…
Reference in a new issue