some cleanup

This commit is contained in:
Mark Tiefenbruck 2008-08-16 05:54:07 -07:00
parent 06837ba864
commit 38654bae45
24 changed files with 42 additions and 324 deletions

View file

@ -1251,7 +1251,7 @@ void Ewmh::toggleState(FluxboxWindow &win, Atom state) {
void Ewmh::setState(FluxboxWindow &win, Atom state, bool value, void Ewmh::setState(FluxboxWindow &win, Atom state, bool value,
WinClient &client) { WinClient &client) {
if (state == m_net->wm_state_sticky) { // STICKY if (state == m_net->wm_state_sticky) { // STICKY
if (value && !win.isStuck() || if ((value && !win.isStuck()) ||
(!value && win.isStuck())) (!value && win.isStuck()))
win.stick(); win.stick();
} else if (state == m_net->wm_state_shaded) { // SHADED } else if (state == m_net->wm_state_shaded) { // SHADED

View file

@ -332,7 +332,8 @@ void Container::repositionItems() {
// calling Container::resize here risks infinite loops // calling Container::resize here risks infinite loops
unsigned int neww = total_width, newh = height; unsigned int neww = total_width, newh = height;
translateSize(m_orientation, neww, newh); translateSize(m_orientation, neww, newh);
if (align == RIGHT && m_orientation != ROT270 || align == LEFT && m_orientation == ROT270) { if ((align == RIGHT && m_orientation != ROT270) ||
(align == LEFT && m_orientation == ROT270)) {
int deltax = 0; int deltax = 0;
int deltay = 0; int deltay = 0;
if (m_orientation == ROT0 || m_orientation == ROT180) if (m_orientation == ROT0 || m_orientation == ROT180)
@ -477,10 +478,10 @@ void Container::setOrientation(Orientation orient) {
for (; it != it_end; ++it) for (; it != it_end; ++it)
(*it)->setOrientation(orient); (*it)->setOrientation(orient);
if ((m_orientation == ROT0 || m_orientation == ROT180) && if (((m_orientation == ROT0 || m_orientation == ROT180) &&
(orient == ROT90 || orient == ROT270) || (orient == ROT90 || orient == ROT270)) ||
(m_orientation == ROT90 || m_orientation == ROT270) && ((m_orientation == ROT90 || m_orientation == ROT270) &&
(orient == ROT0 || orient == ROT180)) { (orient == ROT0 || orient == ROT180))) {
// flip width and height // flip width and height
m_orientation = orient; m_orientation = orient;
resize(height(), width()); resize(height(), width());

View file

@ -151,14 +151,6 @@ void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type,
Convex, CoordModePrevious); Convex, CoordModePrevious);
} }
#ifdef NOT_USED
void FbDrawable::drawPoint(GC gc, int x, int y) {
if (drawable() == 0 || gc == 0)
return;
XDrawPoint(display(), drawable(), gc, x, y);
}
#endif
XImage *FbDrawable::image(int x, int y, unsigned int width, unsigned int height) const { XImage *FbDrawable::image(int x, int y, unsigned int width, unsigned int height) const {
return XGetImage(display(), drawable(), return XGetImage(display(), drawable(),
x, y, width, height, x, y, width, height,

View file

@ -61,10 +61,6 @@ public:
virtual void drawTriangle(GC gc, TriangleType type, int x, int y, unsigned int width, unsigned int height, int scale); virtual void drawTriangle(GC gc, TriangleType type, int x, int y, unsigned int width, unsigned int height, int scale);
#ifdef NOT_USED
virtual void drawPoint(GC gc, int x, int y);
#endif
virtual XImage *image(int x, int y, unsigned int width, unsigned int height) const; virtual XImage *image(int x, int y, unsigned int width, unsigned int height) const;
/// X drawable /// X drawable

View file

@ -283,7 +283,8 @@ void FbWindow::updateTransparent(int the_x, int the_y, unsigned int the_width, u
if (width() == 0 || height() == 0) if (width() == 0 || height() == 0)
return; return;
if (!dest_override && (the_width == 0 && the_height == 0 || the_width == width() && the_height == height()) && if (!dest_override && ((the_width == 0 && the_height == 0) ||
(the_width == width() && the_height == height())) &&
the_x <= 0 && the_y <= 0) { the_x <= 0 && the_y <= 0) {
// do the whole thing // do the whole thing
updateBackground(true); updateBackground(true);
@ -453,12 +454,6 @@ void FbWindow::setCursor(Cursor cur) {
XDefineCursor(display(), window(), cur); XDefineCursor(display(), window(), cur);
} }
#ifdef NOT_USED
void FbWindow::unsetCursor() {
XUndefineCursor(display(), window());
}
#endif
void FbWindow::reparent(const FbWindow &parent, int x, int y, bool continuing) { void FbWindow::reparent(const FbWindow &parent, int x, int y, bool continuing) {
XReparentWindow(display(), window(), parent.window(), x, y); XReparentWindow(display(), window(), parent.window(), x, y);
m_parent = &parent; m_parent = &parent;

View file

@ -137,10 +137,7 @@ public:
void setInputFocus(int revert_to, int time); void setInputFocus(int revert_to, int time);
/// defines a cursor for this window /// defines a cursor for this window
void setCursor(Cursor cur); void setCursor(Cursor cur);
#ifdef NOT_USED
/// uses the parents cursor instead
void unsetCursor();
#endif
void reparent(const FbWindow &parent, int x, int y, bool continuing = true); void reparent(const FbWindow &parent, int x, int y, bool continuing = true);
bool property(Atom property, bool property(Atom property,

View file

@ -89,15 +89,7 @@ public:
void setFont(int fid) { void setFont(int fid) {
XSetFont(m_display, m_gc, fid); XSetFont(m_display, m_gc, fid);
} }
#ifdef NOT_USED
void setClipMask(const FbTk::FbPixmap &mask) {
XSetClipMask(m_display, m_gc, mask.drawable());
}
void setClipOrigin(int x, int y) {
XSetClipOrigin(m_display, m_gc, x, y);
}
#endif
void setGraphicsExposure(bool value) { void setGraphicsExposure(bool value) {
XSetGraphicsExposures(m_display, m_gc, value); XSetGraphicsExposures(m_display, m_gc, value);
} }
@ -112,11 +104,7 @@ public:
void setFillStyle(int style) { void setFillStyle(int style) {
XSetFillStyle(m_display, m_gc, style); XSetFillStyle(m_display, m_gc, style);
} }
#ifdef NOT_USED
void setFillRule(int rule) {
XSetFillRule(m_display, m_gc, rule);
}
#endif
void setLineAttributes(unsigned int width, void setLineAttributes(unsigned int width,
int line_style, int line_style,
int cap_style, int cap_style,

View file

@ -39,22 +39,10 @@ public:
virtual iterator insert(ItemType &item, unsigned int pos=0); virtual iterator insert(ItemType &item, unsigned int pos=0);
/// remove item from list /// remove item from list
virtual void remove(ItemType &item); virtual void remove(ItemType &item);
#ifdef NOT_USED
/// cycle all item upwards
virtual void cycleUp();
/// cycle all items downwards
virtual void cycleDown();
#endif // NOT_USED
/// move item to top /// move item to top
virtual void raise(ItemType &item); virtual void raise(ItemType &item);
/// move item to bottom /// move item to bottom
virtual void lower(ItemType &item); virtual void lower(ItemType &item);
#ifdef NOT_USED
/// raise a specific item one step
virtual void stepUp(ItemType &item);
/// lower a specific item one step
virtual void stepDown(ItemType &item);
#endif // NOT_USED
virtual void restack(); virtual void restack();
/// @return layer item on specific position, on failure 0 /// @return layer item on specific position, on failure 0
ItemType *getItem(unsigned int position); ItemType *getItem(unsigned int position);
@ -95,73 +83,6 @@ void Layer<ItemType, Container>::remove(ItemType &item) {
m_list.erase(it); m_list.erase(it);
} }
#ifdef NOT_USED
template <typename ItemType, typename Container>
void Layer<ItemType, Container>::cycleUp() {
if (size() == 0)
return;
iterator it = itemList().begin();
it++;
rotate(itemList().begin(), it, itemList().end());
restack();
}
template <typename ItemType, typename Container>
void Layer<ItemType, Container>::cycleDown() {
if (size() == 0)
return;
// save last item and remove it from list
ItemType *last_item = itemList().back();
itemList().pop_back();
// add last item to front
itemList().insert(itemList().begin(), last_item);
restack();
}
template <typename ItemType, typename Container>
void Layer<ItemType, Container>::stepUp(ItemType &item) {
iterator it =
find(itemList().begin(), itemList().end(), &item);
if (it == itemList().end())
return;
if (it == itemList().begin()) // we can't raise it more
return;
iterator new_pos = it;
new_pos--;
ItemType *textitem = *it;
// remove item from list
itemList().erase(it);
// insert above last pos
itemList().insert(new_pos, textitem);
restack();
}
template <typename ItemType, typename Container>
void Layer<ItemType, Container>::stepDown(ItemType &item) {
iterator it =
find(itemList().begin(), itemList().end(), &item);
if (it == itemList().end()) // we didn't find the item in our list
return;
if (*it == itemList().back()) // it's already at the bottom
return;
iterator new_pos = it;
new_pos++;
ItemType *textitem = *it;
// remove from list
itemList().erase(it);
// insert on the new place
itemList().insert(new_pos, textitem);
restack();
}
#endif // NOT_USED
template <typename ItemType, typename Container> template <typename ItemType, typename Container>
void Layer<ItemType, Container>::raise(ItemType &item) { void Layer<ItemType, Container>::raise(ItemType &item) {
if (&item == itemList().front()) // already at the bottom if (&item == itemList().front()) // already at the bottom

View file

@ -32,11 +32,6 @@ public:
virtual void raise() = 0; virtual void raise() = 0;
virtual void lower() = 0; virtual void lower() = 0;
#ifdef NOT_USED
virtual void stepUp() = 0;
virtual void stepDown() = 0;
#endif // NOT_USED
}; };
} // end namespace FbTk } // end namespace FbTk

View file

@ -1136,7 +1136,7 @@ void Menu::openSubmenu() {
int item = m_active_index; int item = m_active_index;
if (!isVisible() || !validIndex(item) || !menuitems[item]->isEnabled() || if (!isVisible() || !validIndex(item) || !menuitems[item]->isEnabled() ||
s_focused != this && s_focused && s_focused->isVisible()) (s_focused != this && s_focused && s_focused->isVisible()))
return; return;
clearItem(item); clearItem(item);

View file

@ -76,10 +76,7 @@ public:
void removeAll(); void removeAll();
void setInternalMenu(bool val = true) { m_internal_menu = val; } void setInternalMenu(bool val = true) { m_internal_menu = val; }
void setAlignment(Alignment a) { m_alignment = a; } void setAlignment(Alignment a) { m_alignment = a; }
#ifdef NOT_USED
void setTorn() { m_torn = true; }
void removeParent() { if (m_internal_menu) m_parent = 0; }
#endif
/// raise this window /// raise this window
virtual void raise(); virtual void raise();
/// lower this window /// lower this window
@ -122,16 +119,12 @@ public:
/// hide menu /// hide menu
virtual void hide(bool force = false); virtual void hide(bool force = false);
virtual void clearWindow(); virtual void clearWindow();
#ifdef NOT_USED
void setActiveIndex(int index) { m_active_index = index; }
/*@}*/ /*@}*/
/** /**
@name accessors @name accessors
*/ */
//@{ //@{
int activeIndex() const { return m_active_index; }
#endif
bool isTorn() const { return m_torn; } bool isTorn() const { return m_torn; }
bool isVisible() const { return m_visible; } bool isVisible() const { return m_visible; }
bool isMoving() const { return m_moving; } bool isMoving() const { return m_moving; }

View file

@ -38,10 +38,7 @@ public:
Pointer *operator * () const { return get(); } Pointer *operator * () const { return get(); }
Pointer *operator -> () const { return get(); } Pointer *operator -> () const { return get(); }
Pointer *get() const { return m_data; } Pointer *get() const { return m_data; }
#ifdef NOT_USED
/// @return number of references
unsigned int usedBy() const { return (m_refcount != 0 ? *m_refcount : 0); }
#endif
private: private:
/// increase reference count /// increase reference count
void incRefCount(); void incRefCount();

View file

@ -60,13 +60,6 @@ bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh,
return true; return true;
} }
#ifdef NOT_USED
void SignalHandler::removeHandler(int signum) {
if (signum < NSIG)
s_signal_handler[signum] = 0; // clear handler pointer
}
#endif
void SignalHandler::handleSignal(int signum) { void SignalHandler::handleSignal(int signum) {
if (signum >= NSIG) if (signum >= NSIG)
return; return;

View file

@ -52,13 +52,7 @@ public:
@param oldhandler_ret return handler to old sighandler @param oldhandler_ret return handler to old sighandler
*/ */
bool registerHandler(int signum, SignalEventHandler *eh, SignalEventHandler **oldhandler_ret = 0); bool registerHandler(int signum, SignalEventHandler *eh, SignalEventHandler **oldhandler_ret = 0);
#ifdef NOT_USED
/**
removes the signum handler
@param signum signal number
*/
void removeHandler(int signum);
#endif
private: private:
SignalHandler(); SignalHandler();

View file

@ -97,15 +97,6 @@ void TextButton::setFont(FbTk::Font &font) {
font.validOrientation(m_orientation); // load the orientation! font.validOrientation(m_orientation); // load the orientation!
} }
#ifdef NOT_USED
/// set bevel and redraw text
void TextButton::setBevel(int bevel) {
if (m_bevel == bevel)
return;
m_bevel = bevel;
}
#endif
void TextButton::setTextPaddingLeft(unsigned int leftpadding) { void TextButton::setTextPaddingLeft(unsigned int leftpadding) {
m_left_padding = leftpadding; m_left_padding = leftpadding;
} }
@ -138,13 +129,6 @@ unsigned int TextButton::textWidth() const {
return font().textWidth(text().data(), text().size()); return font().textWidth(text().data(), text().size());
} }
#ifdef NOT_USED
unsigned int TextButton::textHeight() const {
return font().height();
}
#endif
void TextButton::renderForeground(FbWindow &win, FbDrawable &drawable) { void TextButton::renderForeground(FbWindow &win, FbDrawable &drawable) {
// (win should always be *this, no need to check) // (win should always be *this, no need to check)
drawText(0, 0, &drawable); drawText(0, 0, &drawable);

View file

@ -40,9 +40,6 @@ public:
bool setOrientation(FbTk::Orientation orient); bool setOrientation(FbTk::Orientation orient);
void setText(const std::string &text); void setText(const std::string &text);
void setFont(FbTk::Font &font); void setFont(FbTk::Font &font);
#ifdef NOT_USED
void setBevel(int bevel);
#endif
void setTextPadding(unsigned int padding); void setTextPadding(unsigned int padding);
void setTextPaddingLeft(unsigned int leftpadding); void setTextPaddingLeft(unsigned int leftpadding);
void setTextPaddingRight(unsigned int rightpadding); void setTextPaddingRight(unsigned int rightpadding);
@ -67,14 +64,7 @@ public:
FbTk::Font &font() const { return *m_font; } FbTk::Font &font() const { return *m_font; }
FbTk::Orientation orientation() const { return m_orientation; } FbTk::Orientation orientation() const { return m_orientation; }
unsigned int textWidth() const; unsigned int textWidth() const;
#ifdef NOT_USED
unsigned int textHeight() const;
#endif
int bevel() const { return m_bevel; } int bevel() const { return m_bevel; }
#ifdef NOT_USED
unsigned int leftPadding() const { return m_left_padding; }
unsigned int rightPadding() const { return m_right_padding; }
#endif
void renderForeground(FbWindow &win, FbDrawable &drawable); void renderForeground(FbWindow &win, FbDrawable &drawable);

View file

@ -89,11 +89,12 @@ void Texture::setFromString(const char * const texture_str) {
else else
addType(Texture::DEFAULT_BEVEL); addType(Texture::DEFAULT_BEVEL);
if (! (type() & Texture::FLAT)) if (! (type() & Texture::FLAT)) {
if (strstr(ts, "bevel2")) if (strstr(ts, "bevel2"))
addType(Texture::BEVEL2); addType(Texture::BEVEL2);
else else
addType(Texture::BEVEL1); addType(Texture::BEVEL1);
}
if (strstr(ts, "invert")) if (strstr(ts, "invert"))
addType(Texture::INVERT); addType(Texture::INVERT);

View file

@ -174,100 +174,6 @@ void XLayer::remove(XLayerItem &item) {
} }
} }
#ifdef NOT_USED
void XLayer::cycleUp() {
// need to find highest visible window, and move it to bottom
iterator it = itemList().begin();
iterator it_end = itemList().end();
while (it != it_end && !(*it)->visible())
++it;
// if there is something to do
if (it != it_end)
lower(**it);
}
void XLayer::cycleDown() {
// need to find lowest visible window, and move it to top
// so use a reverse iterator, and the same logic as cycleUp()
reverse_iterator it = itemList().rbegin();
reverse_iterator it_end = itemList().rend();
while (it != it_end && !(*it)->visible())
++it;
// if there is something to do
if (it != it_end)
raise(**it);
}
void XLayer::stepUp(XLayerItem &item) {
// need to find next visible window upwards, and put it above that
if (&item == itemList().front())
return; // nothing to do
// TODO: is there a better way of doing this?
// get our item
iterator myit = find(itemList().begin(), itemList().end(), &item);
iterator it = myit;
// go to the one above it in our layer (top is front, so we decrement)
--it;
// keep going until we find one that is currently visible to the user
while (it != itemList().begin() && !(*it)->visible())
--it;
if (it == itemList().begin() && !(*it)->visible()) {
// reached front item, but it wasn't visible, therefore it was already raised
} else {
// it is the next visible item down, we need to be above it.
// remove that item from the list and add it back to before it (the one we want to go above)
itemList().erase(myit);
itemList().insert(it, &item);
// if we've reached the top of the layer, we need to stack below the next one up
if (it == itemList().begin()) {
stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
} else {
// otherwise go up one in this layer (i.e. above the one we want to go above)
--it;
// and stack below that.
stackBelowItem(&item, *it);
}
}
}
void XLayer::stepDown(XLayerItem &item) {
// need to find next visible window down, and put it below that
// if we're already the bottom of the layer
if (&item == itemList().back())
return; // nothing to do
// get our position
iterator it = find(itemList().begin(), itemList().end(), &item);
// go one below it (top is front, so we must increment)
it++;
iterator it_end = itemList().end();
// keep going down until we find a visible one
while (it != it_end && !(*it)->visible())
it++;
// if we didn't reach the end, then stack below the
// item that we found.
if (it != it_end)
stackBelowItem(&item, *it);
// if we did reach the end, then there are no visible windows, so we don't do anything
}
#endif // NOT_USED
void XLayer::raise(XLayerItem &item) { void XLayer::raise(XLayerItem &item) {
// assume it is already in this layer // assume it is already in this layer

View file

@ -60,15 +60,6 @@ public:
iterator insert(XLayerItem &item, unsigned int pos=0); iterator insert(XLayerItem &item, unsigned int pos=0);
void remove(XLayerItem &item); void remove(XLayerItem &item);
#ifdef NOT_USED
// move highest to bottom
void cycleUp();
void cycleDown();
// just go above the next window up in the current layer (not all the way to the top)
void stepUp(XLayerItem &item);
void stepDown(XLayerItem &item);
#endif // NOT_USED
// bring to top of layer // bring to top of layer
void raise(XLayerItem &item); void raise(XLayerItem &item);
void lower(XLayerItem &item); void lower(XLayerItem &item);

View file

@ -58,16 +58,6 @@ void XLayerItem::tempRaise() {
m_layer->tempRaise(*this); m_layer->tempRaise(*this);
} }
#ifdef NOT_USED
void XLayerItem::stepUp() {
m_layer->stepUp(*this);
}
void XLayerItem::stepDown() {
m_layer->stepDown(*this);
}
#endif // NOT_USED
void XLayerItem::raiseLayer() { void XLayerItem::raiseLayer() {
m_layer->raiseLayer(*this); m_layer->raiseLayer(*this);
} }

View file

@ -44,12 +44,6 @@ public:
void lower(); void lower();
void tempRaise(); // this raise gets reverted by a restack() void tempRaise(); // this raise gets reverted by a restack()
#ifdef NOT_USED
// go above the next item visible in this layer
void stepUp();
void stepDown();
#endif // NOT_USED
// send to next layer up // send to next layer up
void raiseLayer(); void raiseLayer();
void lowerLayer(); void lowerLayer();

View file

@ -247,8 +247,8 @@ void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int heigh
if (move && x == window().x() && y == window().y()) if (move && x == window().x() && y == window().y())
move = false; move = false;
if (resize && (m_state.shaded || width == FbWinFrame::width() && if (resize && (m_state.shaded || (width == FbWinFrame::width() &&
height == FbWinFrame::height())) height == FbWinFrame::height())))
resize = false; resize = false;
if (!move && !resize) if (!move && !resize)
@ -265,7 +265,7 @@ void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int heigh
m_window.resize(width, height); m_window.resize(width, height);
} }
if (move || resize && m_screen.getTabPlacement() != TOPLEFT) if (move || (resize && m_screen.getTabPlacement() != TOPLEFT))
alignTabs(); alignTabs();
if (resize) { if (resize) {
@ -413,7 +413,7 @@ void FbWinFrame::notifyMoved(bool clear) {
if (alpha == 255) if (alpha == 255)
return; return;
if (m_tabmode == EXTERNAL && m_use_tabs || m_use_titlebar) { if ((m_tabmode == EXTERNAL && m_use_tabs) || m_use_titlebar) {
m_tab_container.parentMoved(); m_tab_container.parentMoved();
m_tab_container.for_each(mem_fun(&FbTk::Button::parentMoved)); m_tab_container.for_each(mem_fun(&FbTk::Button::parentMoved));
} }
@ -1430,8 +1430,8 @@ int FbWinFrame::getDecoMaskFromString(const string &str_label) {
if (label == "tab") if (label == "tab")
return DECOR_TAB; return DECOR_TAB;
int mask = -1; int mask = -1;
if (str_label.size() > 1 && str_label[0] == '0' && str_label[1] == 'x' || if ((str_label.size() > 1 && str_label[0] == '0' && str_label[1] == 'x') ||
str_label.size() > 0 && isdigit(str_label[0])) (str_label.size() > 0 && isdigit(str_label[0])))
mask = strtol(str_label.c_str(), NULL, 0); mask = strtol(str_label.c_str(), NULL, 0);
return mask; return mask;
} }

View file

@ -1310,8 +1310,8 @@ void Remember::setupFrame(FluxboxWindow &win) {
if (app->shadedstate_remember) if (app->shadedstate_remember)
// if inconsistent... // if inconsistent...
if (win.isShaded() && !app->shadedstate || if ((win.isShaded() && !app->shadedstate) ||
!win.isShaded() && app->shadedstate) (!win.isShaded() && app->shadedstate))
win.shade(); // toggles win.shade(); // toggles
// external tabs aren't available atm... // external tabs aren't available atm...
@ -1319,8 +1319,8 @@ void Remember::setupFrame(FluxboxWindow &win) {
if (app->stuckstate_remember) if (app->stuckstate_remember)
// if inconsistent... // if inconsistent...
if (win.isStuck() && !app->stuckstate || if ((win.isStuck() && !app->stuckstate) ||
!win.isStuck() && app->stuckstate) (!win.isStuck() && app->stuckstate))
win.stick(); // toggles win.stick(); // toggles
if (app->minimizedstate_remember) { if (app->minimizedstate_remember) {

View file

@ -1277,9 +1277,9 @@ void FluxboxWindow::getMaxSize(unsigned int* width, unsigned int* height) const
for (; it != it_end; ++it) { for (; it != it_end; ++it) {
// special case for max height/width == 0 // special case for max height/width == 0
// 0 indicates unlimited size, so we skip them // 0 indicates unlimited size, so we skip them
if (h || (*it)->maxHeight() && h > (*it)->maxHeight()) if (!h || ((*it)->maxHeight() && h > (*it)->maxHeight()))
h = (*it)->maxHeight(); h = (*it)->maxHeight();
if (!w || (*it)->maxWidth() && w > (*it)->maxWidth()) if (!w || ((*it)->maxWidth() && w > (*it)->maxWidth()))
w = (*it)->maxWidth(); w = (*it)->maxWidth();
} }
@ -1876,7 +1876,7 @@ void FluxboxWindow::moveToLayer(int layernum, bool force) {
if (!m_initialized) if (!m_initialized)
m_layernum = layernum; m_layernum = layernum;
if (m_layernum == layernum && !force || !m_client) if ((m_layernum == layernum && !force) || !m_client)
return; return;
// get root window // get root window
@ -2475,9 +2475,9 @@ void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) {
} }
// don't allow moving/resizing fullscreen or maximized windows // don't allow moving/resizing fullscreen or maximized windows
if (isFullscreen() || isMaximizedHorz() && screen().getMaxIgnoreIncrement()) if (isFullscreen() || (isMaximizedHorz() && screen().getMaxIgnoreIncrement()))
cr.value_mask = cr.value_mask & ~(CWWidth | CWX); cr.value_mask = cr.value_mask & ~(CWWidth | CWX);
if (isFullscreen() || isMaximizedVert() && screen().getMaxIgnoreIncrement()) if (isFullscreen() || (isMaximizedVert() && screen().getMaxIgnoreIncrement()))
cr.value_mask = cr.value_mask & ~(CWHeight | CWY); cr.value_mask = cr.value_mask & ~(CWHeight | CWY);
#ifdef REMEMBER #ifdef REMEMBER
@ -2545,7 +2545,7 @@ void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) {
case Above: case Above:
case TopIf: case TopIf:
default: default:
if (isFocused() && focusRequestFromClient(*client) || if ((isFocused() && focusRequestFromClient(*client)) ||
!FocusControl::focusedWindow()) { !FocusControl::focusedWindow()) {
setCurrentClient(*client, true); setCurrentClient(*client, true);
raise(); raise();
@ -2618,8 +2618,8 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
// check keys file first // check keys file first
Keys *k = Fluxbox::instance()->keys(); Keys *k = Fluxbox::instance()->keys();
if (onTitlebar && k->doAction(be.type, be.state, be.button, if ((onTitlebar && k->doAction(be.type, be.state, be.button,
Keys::ON_TITLEBAR, m_client, be.time) || Keys::ON_TITLEBAR, m_client, be.time)) ||
k->doAction(be.type, be.state, be.button, Keys::ON_WINDOW, m_client, k->doAction(be.type, be.state, be.button, Keys::ON_WINDOW, m_client,
be.time)) { be.time)) {
return; return;
@ -2706,8 +2706,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
return; return;
} }
if (moving || (me.state & Button1Mask) && functions.move && if (moving || ((me.state & Button1Mask) && functions.move &&
inside_titlebar && !isResizing() && m_attaching_tab == 0) { inside_titlebar && !isResizing() && m_attaching_tab == 0)) {
if (! isMoving()) { if (! isMoving()) {
startMoving(me.x_root, me.y_root); startMoving(me.x_root, me.y_root);
@ -2781,11 +2781,11 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
screen().showPosition(dx, dy); screen().showPosition(dx, dy);
} // end if moving } // end if moving
} else if (resizing || m_attaching_tab == 0 && functions.resize && } else if (resizing || (m_attaching_tab == 0 && functions.resize &&
(((me.state & Button1Mask) && (((me.state & Button1Mask) &&
(me.window == frame().gripRight() || (me.window == frame().gripRight() ||
me.window == frame().gripLeft())) || me.window == frame().gripLeft())) ||
me.window == frame().window())) { me.window == frame().window()))) {
if (! resizing) { if (! resizing) {