diff options
author | simonb <simonb> | 2006-04-24 14:29:21 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-24 14:29:21 (GMT) |
commit | acf4326f3cc3451aaf874b0b0777d69be5834e57 (patch) | |
tree | 8abf3c4158ece9c97c3764d7eb4eb9e1aa53bf84 /src | |
parent | f6a072430d4de159e229d6172adc5ba5ae985512 (diff) | |
download | fluxbox_pavel-acf4326f3cc3451aaf874b0b0777d69be5834e57.zip fluxbox_pavel-acf4326f3cc3451aaf874b0b0777d69be5834e57.tar.bz2 |
Use -Wall when --enable-debug and some warning fixes
+ thanks Jonas Koelker
Diffstat (limited to 'src')
-rw-r--r-- | src/ClockTool.cc | 2 | ||||
-rw-r--r-- | src/Ewmh.cc | 8 | ||||
-rw-r--r-- | src/FbTk/FbWindow.hh | 1 | ||||
-rw-r--r-- | src/FbTk/SignalHandler.hh | 1 | ||||
-rw-r--r-- | src/LayerMenu.hh | 1 | ||||
-rw-r--r-- | src/PlacementStrategy.hh | 1 | ||||
-rw-r--r-- | src/Window.cc | 3 | ||||
-rw-r--r-- | src/main.cc | 7 |
8 files changed, 14 insertions, 10 deletions
diff --git a/src/ClockTool.cc b/src/ClockTool.cc index e4b6c0c..2c0ad46 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc | |||
@@ -257,7 +257,7 @@ void ClockTool::updateTime() { | |||
257 | return; | 257 | return; |
258 | m_button.setText(time_string); | 258 | m_button.setText(time_string); |
259 | 259 | ||
260 | int new_width = m_theme.font().textWidth(time_string, time_string_len) + 2; | 260 | unsigned int new_width = m_theme.font().textWidth(time_string, time_string_len) + 2; |
261 | if (new_width > m_button.width()) { | 261 | if (new_width > m_button.width()) { |
262 | resize(new_width, m_button.height()); | 262 | resize(new_width, m_button.height()); |
263 | resizeSig().notify(); | 263 | resizeSig().notify(); |
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 96722d1..6bcd3e6 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -267,8 +267,8 @@ void Ewmh::setupFrame(FluxboxWindow &win) { | |||
267 | if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL, | 267 | if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL, |
268 | &ret_type, &fmt, &nitems, &bytes_after, | 268 | &ret_type, &fmt, &nitems, &bytes_after, |
269 | (unsigned char **) &data) && data) { | 269 | (unsigned char **) &data) && data) { |
270 | unsigned int desktop = static_cast<unsigned int>(*data); | 270 | unsigned int desktop = static_cast<long>(*data); |
271 | if (desktop == 0xFFFFFFFF && !win.isStuck()) | 271 | if (desktop == -1 && !win.isStuck()) |
272 | win.stick(); | 272 | win.stick(); |
273 | else | 273 | else |
274 | win.setWorkspace(desktop); | 274 | win.setWorkspace(desktop); |
@@ -634,7 +634,7 @@ void Ewmh::updateWorkspace(FluxboxWindow &win) { | |||
634 | long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); | 634 | long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); |
635 | 635 | ||
636 | if (win.isStuck()) | 636 | if (win.isStuck()) |
637 | workspace = 0xFFFFFFFF; // appear on all desktops/workspaces | 637 | workspace = -1; // appear on all desktops/workspaces |
638 | 638 | ||
639 | FluxboxWindow::ClientList::iterator it = win.clientList().begin(); | 639 | FluxboxWindow::ClientList::iterator it = win.clientList().begin(); |
640 | FluxboxWindow::ClientList::iterator it_end = win.clientList().end(); | 640 | FluxboxWindow::ClientList::iterator it_end = win.clientList().end(); |
@@ -661,7 +661,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, | |||
661 | 661 | ||
662 | // if it's stick, make sure it is stuck. | 662 | // if it's stick, make sure it is stuck. |
663 | // otherwise, make sure it isn't stuck | 663 | // otherwise, make sure it isn't stuck |
664 | if (ce.data.l[0] == 0xFFFFFFFF) { | 664 | if (ce.data.l[0] == -1) { |
665 | if (!fbwin->isStuck()) | 665 | if (!fbwin->isStuck()) |
666 | fbwin->stick(); | 666 | fbwin->stick(); |
667 | return true; | 667 | return true; |
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 3a5d18d..8f7376c 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh | |||
@@ -266,6 +266,7 @@ private: | |||
266 | class FbWindowRenderer { | 266 | class FbWindowRenderer { |
267 | public: | 267 | public: |
268 | virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0; | 268 | virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0; |
269 | virtual ~FbWindowRenderer() { } | ||
269 | }; | 270 | }; |
270 | 271 | ||
271 | 272 | ||
diff --git a/src/FbTk/SignalHandler.hh b/src/FbTk/SignalHandler.hh index 23bac97..7b013cf 100644 --- a/src/FbTk/SignalHandler.hh +++ b/src/FbTk/SignalHandler.hh | |||
@@ -33,6 +33,7 @@ namespace FbTk { | |||
33 | class SignalEventHandler { | 33 | class SignalEventHandler { |
34 | public: | 34 | public: |
35 | virtual void handleSignal(int signum) = 0; | 35 | virtual void handleSignal(int signum) = 0; |
36 | virtual ~SignalEventHandler() { } | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | /// Handles system signals, singleton. | 39 | /// Handles system signals, singleton. |
diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh index e22ba30..724e7bc 100644 --- a/src/LayerMenu.hh +++ b/src/LayerMenu.hh | |||
@@ -34,6 +34,7 @@ class LayerObject { | |||
34 | public: | 34 | public: |
35 | virtual void moveToLayer(int layer_number) = 0; | 35 | virtual void moveToLayer(int layer_number) = 0; |
36 | virtual int layerNumber() const = 0; | 36 | virtual int layerNumber() const = 0; |
37 | virtual ~LayerObject() { } | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | 40 | ||
diff --git a/src/PlacementStrategy.hh b/src/PlacementStrategy.hh index 19376ca..001218d 100644 --- a/src/PlacementStrategy.hh +++ b/src/PlacementStrategy.hh | |||
@@ -40,6 +40,7 @@ struct PlacementStrategy { | |||
40 | virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist, | 40 | virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist, |
41 | const FluxboxWindow &win, | 41 | const FluxboxWindow &win, |
42 | int &place_x, int &place_y) = 0; | 42 | int &place_x, int &place_y) = 0; |
43 | virtual ~PlacementStrategy() { } | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | #endif // PLACEMENTSTRATEGY_HH | 46 | #endif // PLACEMENTSTRATEGY_HH |
diff --git a/src/Window.cc b/src/Window.cc index 7ffc1d5..31f4374 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -3378,7 +3378,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { | |||
3378 | 3378 | ||
3379 | // test against tabs too | 3379 | // test against tabs too |
3380 | bool i_have_tabs = frame().externalTabMode(); | 3380 | bool i_have_tabs = frame().externalTabMode(); |
3381 | int xoff,yoff,woff,hoff; | 3381 | int xoff = 0, yoff = 0, woff = 0, hoff = 0; |
3382 | if (i_have_tabs) { | 3382 | if (i_have_tabs) { |
3383 | xoff = xOffset(); | 3383 | xoff = xOffset(); |
3384 | yoff = yOffset(); | 3384 | yoff = yOffset(); |
@@ -3386,7 +3386,6 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { | |||
3386 | hoff = heightOffset(); | 3386 | hoff = heightOffset(); |
3387 | } | 3387 | } |
3388 | 3388 | ||
3389 | |||
3390 | ///////////////////////////////////// | 3389 | ///////////////////////////////////// |
3391 | // begin by checking the screen (or Xinerama head) edges | 3390 | // begin by checking the screen (or Xinerama head) edges |
3392 | 3391 | ||
diff --git a/src/main.cc b/src/main.cc index fedc3a9..b458fbf 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -304,9 +304,10 @@ int main(int argc, char **argv) { | |||
304 | cerr.rdbuf(errbuf); | 304 | cerr.rdbuf(errbuf); |
305 | 305 | ||
306 | if (restarting) { | 306 | if (restarting) { |
307 | if (restart_argument.c_str()) { | 307 | const char *arg = restart_argument.c_str(); |
308 | execlp(restart_argument.c_str(), restart_argument.c_str(), 0); | 308 | if (arg) { |
309 | perror(restart_argument.c_str()); | 309 | execlp(arg, arg, (char *) NULL); |
310 | perror(arg); | ||
310 | } | 311 | } |
311 | 312 | ||
312 | // fall back in case the above execlp doesn't work | 313 | // fall back in case the above execlp doesn't work |