Fixed some signed/unsigned warnings
jump to
@@ -19,8 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// stupid macros needed to access some functions in version 2 of the GNU C -// library +//Use GNU extensions #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif // _GNU_SOURCE@@ -50,9 +49,9 @@ update();
} -void Iconmenu::itemSelected(int button, int index) { +void Iconmenu::itemSelected(int button, unsigned int index) { if (button == 1) { - if (index >= 0 && index < screen->getIconCount()) { + if (index < screen->getIconCount()) { FluxboxWindow *win = screen->getIcon(index); if (win)
@@ -36,7 +36,7 @@ BScreen *screen;
protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); public:
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.26 2002/04/02 23:14:54 fluxgen Exp $ +// $Id: Screen.hh,v 1.27 2002/04/03 12:08:54 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH@@ -124,8 +124,8 @@ inline const unsigned int getBorderWidth2x(void) const { return theme->getBorderWidth()*2; }
inline const unsigned int getCurrentWorkspaceID() const { return current_workspace->getWorkspaceID(); } typedef std::vector<FluxboxWindow *> Icons; - inline const unsigned int getCount(void) { return workspacesList.size(); } - inline const int getIconCount(void) { return iconList.size(); } + inline const unsigned int getCount(void) const { return workspacesList.size(); } + inline const unsigned int getIconCount(void) const { return iconList.size(); } inline Icons &getIconList(void) { return iconList; } inline const int getNumberOfWorkspaces(void) { return *resource.workspaces; }
@@ -722,8 +722,8 @@ "Auto hide"), 2);
update(); - if (slit->isOnTop()) setItemSelected(2, True); - if (slit->doAutoHide()) setItemSelected(3, True); + if (slit->isOnTop()) setItemSelected(2, true); + if (slit->doAutoHide()) setItemSelected(3, true); }@@ -738,30 +738,32 @@ #endif // XINERAMA
} -void Slitmenu::itemSelected(int button, int index) { +void Slitmenu::itemSelected(int button, unsigned int index) { if (button == 1) { BasemenuItem *item = find(index); if (! item) return; switch (item->function()) { case 1: // always on top - { - Bool change = ((slit->isOnTop()) ? False : True); - slit->on_top = change; - setItemSelected(2, change); + { + bool change = ((slit->isOnTop()) ? false : true); + slit->on_top = change; + setItemSelected(2, change); - if (slit->isOnTop()) slit->screen->raiseWindows((Window *) 0, 0); - break; - } + if (slit->isOnTop()) + slit->screen->raiseWindows((Window *) 0, 0); + + break; + } case 2: // auto hide - { - Bool change = ((slit->doAutoHide()) ? False : True); - slit->do_auto_hide = change; - setItemSelected(3, change); + { + bool change = ((slit->doAutoHide()) ? false : true); + slit->do_auto_hide = change; + setItemSelected(3, change); - break; - } + break; + } } } }@@ -820,13 +822,13 @@
update(); if (sm->slit->screen->getSlitDirection() == Slit::HORIZONTAL) - setItemSelected(0, True); + setItemSelected(0, true); else - setItemSelected(1, True); + setItemSelected(1, true); } -void Slitmenu::Directionmenu::itemSelected(int button, int index) { +void Slitmenu::Directionmenu::itemSelected(int button, unsigned int index) { if (button == 1) { BasemenuItem *item = find(index); if (! item) return;@@ -834,11 +836,11 @@
slitmenu->slit->screen->saveSlitDirection(item->function()); if (item->function() == Slit::HORIZONTAL) { - setItemSelected(0, True); - setItemSelected(1, False); + setItemSelected(0, true); + setItemSelected(1, false); } else { - setItemSelected(0, False); - setItemSelected(1, True); + setItemSelected(0, false); + setItemSelected(1, true); } hide();@@ -931,7 +933,7 @@ update();
} -void Slitmenu::Placementmenu::itemSelected(int button, int index) { +void Slitmenu::Placementmenu::itemSelected(int button, unsigned int index) { if (button == 1) { BasemenuItem *item = find(index); if (! item) return;
@@ -55,7 +55,7 @@ private:
Slitmenu *slitmenu; protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); public: Directionmenu(Slitmenu *);@@ -66,7 +66,7 @@ private:
Slitmenu *slitmenu; protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); public: Placementmenu(Slitmenu *);@@ -101,7 +101,7 @@ friend class Slit;
protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); virtual void internal_hide(void); };
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Tab.cc,v 1.20 2002/02/04 06:50:48 fluxgen Exp $ +// $Id: Tab.cc,v 1.21 2002/04/03 12:08:54 fluxgen Exp $ #include "Tab.hh"@@ -284,8 +284,10 @@ if (win->isStuck()) {
win->blackbox_attrib.flags ^= BaseDisplay::ATTRIB_OMNIPRESENT; win->blackbox_attrib.attrib ^= BaseDisplay::ATTRIB_OMNIPRESENT; win->stuck = false; - if (!win->isIconic()) - win->getScreen()->reassociateWindow(win, -1, true); + if (!win->isIconic()) { + BScreen *screen = win->getScreen(); + screen->reassociateWindow(win, screen->getCurrentWorkspace()->getWorkspaceID(), true); + } } else { win->stuck = true;
@@ -21,11 +21,11 @@ // DEALINGS IN THE SOFTWARE.
//use GNU extensions #ifndef _GNU_SOURCE -# define _GNU_SOURCE +#define _GNU_SOURCE #endif // _GNU_SOURCE #ifdef HAVE_CONFIG_H -# include "../config.h" +#include "../config.h" #endif // HAVE_CONFIG_H #include "Timer.hh"
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.16 2002/03/29 21:47:58 pekdon Exp $ +// $Id: Toolbar.cc,v 1.17 2002/04/03 12:08:54 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library@@ -1308,9 +1308,9 @@
update(); if (toolbar->isOnTop()) - setItemSelected(1, True); + setItemSelected(1, true); if (toolbar->doAutoHide()) - setItemSelected(2, True); + setItemSelected(2, true); }@@ -1325,7 +1325,7 @@
} -void Toolbarmenu::itemSelected(int button, int index) { +void Toolbarmenu::itemSelected(int button, unsigned int index) { if (button == 1) { BasemenuItem *item = find(index); if (! item) return;@@ -1333,7 +1333,7 @@
switch (item->function()) { case 1: // always on top { - Bool change = ((toolbar->isOnTop()) ? False : True); + bool change = ((toolbar->isOnTop()) ? False : True); toolbar->on_top = change; setItemSelected(1, change);@@ -1343,7 +1343,7 @@ }
case 2: // auto hide { - Bool change = ((toolbar->doAutoHide()) ? False : True); + bool change = ((toolbar->doAutoHide()) ? False : True); toolbar->do_auto_hide = change; setItemSelected(2, change);@@ -1450,7 +1450,7 @@ update();
} -void Toolbarmenu::Placementmenu::itemSelected(int button, int index) { +void Toolbarmenu::Placementmenu::itemSelected(int button, unsigned int index) { if (button == 1) { BasemenuItem *item = find(index); if (! item)@@ -1494,7 +1494,7 @@ update();
} -void Toolbarmenu::Headmenu::itemSelected(int button, int index) { +void Toolbarmenu::Headmenu::itemSelected(int button, unsigned int index) { if (button == 1) { BasemenuItem *item = find(index); if (! item)
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.hh,v 1.9 2002/03/19 14:30:42 fluxgen Exp $ +// $Id: Toolbar.hh,v 1.10 2002/04/03 12:08:54 fluxgen Exp $ #ifndef TOOLBAR_HH #define TOOLBAR_HH@@ -42,7 +42,7 @@ private:
Toolbarmenu *toolbarmenu; protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); public: Placementmenu(Toolbarmenu *);@@ -56,7 +56,7 @@ private:
Toolbarmenu *toolbarmenu; protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); }; #endif // XINERAMA@@ -73,7 +73,7 @@ friend class Toolbar;
protected: - virtual void itemSelected(int, int); + virtual void itemSelected(int button, unsigned int index); virtual void internal_hide(void); public:
@@ -1,3 +1,6 @@
+// Workspace.hh for Fluxbox +// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) +// // Workspace.hh for Blackbox - an X11 Window manager // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) //