all repos — fluxbox @ b8802ad22a0b720143c0381cdac1beb10a7b5193

custom fork of the fluxbox windowmanager

fix usage of decoration.border (incl xmms move bug)
add BORDER to help turn on borders to remember stuff
rathnor rathnor
commit

b8802ad22a0b720143c0381cdac1beb10a7b5193

parent

bbaca5b43b1ef51c516f4fd1a75f5659767649c5

4 files changed, 45 insertions(+), 49 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,9 @@

(Format: Year/Month/Day) Changes for 0.9.3: +*03/05/26: + * Fix usage of decorations.border, add BORDER decoration to remember + (Simon) + Window.hh/cc Remember.cc *03/05/24: * Fix crash when toolbar turned off, and toolbar initialisation (Simon) Menu.cc Screen.cc Toolbar.cc
M src/Remember.ccsrc/Remember.cc

@@ -21,7 +21,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: Remember.cc,v 1.16 2003/05/15 23:30:06 fluxgen Exp $ +// $Id: Remember.cc,v 1.17 2003/05/26 04:24:24 rathnor Exp $ #include "Remember.hh" #include "StringUtil.hh"

@@ -262,6 +262,11 @@ );

} else if (str_label == "TOOL") { app.rememberDecostate((unsigned int) FluxboxWindow::DECORM_TITLEBAR + | FluxboxWindow::DECORM_MENU + ); + } else if (str_label == "BORDER") { + app.rememberDecostate((unsigned int) + FluxboxWindow::DECORM_BORDER | FluxboxWindow::DECORM_MENU ); } else {
M src/Window.ccsrc/Window.cc

@@ -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: Window.cc,v 1.186 2003/05/24 13:02:49 fluxgen Exp $ +// $Id: Window.cc,v 1.187 2003/05/26 04:24:24 rathnor Exp $ #include "Window.hh"

@@ -502,7 +502,7 @@ associateClientWindow();

grabButtons(); - positionWindows(); + applyDecorations(); if (m_workspace_number < 0 || m_workspace_number >= screen().getCount()) m_workspace_number = screen().currentWorkspaceID();

@@ -839,10 +839,10 @@ }

void FluxboxWindow::reconfigure() { - + upsize(); - positionWindows(); + applyDecorations(); setFocusFlag(focused);

@@ -856,32 +856,6 @@ m_windowmenu.reconfigure();

} - -void FluxboxWindow::positionWindows() { - - frame().window().setBorderWidth(screen().rootTheme().borderWidth()); - frame().clientArea().setBorderWidth(0); // client area bordered by other things - - frame().titlebar().setBorderWidth(screen().rootTheme().borderWidth()); - if (decorations.titlebar) { - frame().showTitlebar(); - } else { - frame().hideTitlebar(); - } - - frame().handle().setBorderWidth(screen().rootTheme().borderWidth()); - frame().gripLeft().setBorderWidth(screen().rootTheme().borderWidth()); - frame().gripRight().setBorderWidth(screen().rootTheme().borderWidth()); - - if (decorations.handle) - frame().showHandle(); - else - frame().hideHandle(); - - frame().reconfigure(); - -} - /// update current client title and title in our frame void FluxboxWindow::updateTitleFromClient() {

@@ -1026,12 +1000,12 @@ int format;

Atom atom_return; unsigned long num, len; Atom motif_wm_hints = XInternAtom(display, "_MOTIF_WM_HINTS", False); - if (!m_client->property(motif_wm_hints, 0, + if (!(m_client->property(motif_wm_hints, 0, PropMwmHintsElements, false, motif_wm_hints, &atom_return, &format, &num, &len, - (unsigned char **) &m_client->mwm_hint) == Success && - m_client->mwm_hint) { + (unsigned char **) &m_client->mwm_hint) && + m_client->mwm_hint)) { return; } if (num != static_cast<unsigned int>(PropMwmHintsElements))

@@ -1182,18 +1156,18 @@

//TODO hint skip focus if (((signed) (frame().x() + frame().width())) < 0) { if (((signed) (frame().y() + frame().height())) < 0) { - moveResize(screen().rootTheme().borderWidth(), screen().rootTheme().borderWidth(), + moveResize(frame().window().borderWidth(), frame().window().borderWidth(), frame().width(), frame().height()); } else if (frame().y() > (signed) screen().height()) { - moveResize(screen().rootTheme().borderWidth(), screen().height() - frame().height(), + moveResize(frame().window().borderWidth(), screen().height() - frame().height(), frame().width(), frame().height()); } else { - moveResize(screen().rootTheme().borderWidth(), frame().y() + screen().rootTheme().borderWidth(), + moveResize(frame().window().borderWidth(), frame().y() + frame().window().borderWidth(), frame().width(), frame().height()); } } else if (frame().x() > (signed) screen().width()) { if (((signed) (frame().y() + frame().height())) < 0) { - moveResize(screen().width() - frame().width(), screen().rootTheme().borderWidth(), + moveResize(screen().width() - frame().width(), frame().window().borderWidth(), frame().width(), frame().height()); } else if (frame().y() > (signed) screen().height()) { moveResize(screen().width() - frame().width(),

@@ -1201,7 +1175,7 @@ screen().height() - frame().height(),

frame().width(), frame().height()); } else { moveResize(screen().width() - frame().width(), - frame().y() + screen().rootTheme().borderWidth(), + frame().y() + frame().window().borderWidth(), frame().width(), frame().height()); } }

@@ -2360,8 +2334,8 @@ if (screen().clickRaises())

raise(); XAllowEvents(display, ReplayPointer, be.time); } else { - m_button_grab_x = be.x_root - frame().x() - screen().rootTheme().borderWidth(); - m_button_grab_y = be.y_root - frame().y() - screen().rootTheme().borderWidth(); + m_button_grab_x = be.x_root - frame().x() - frame().window().borderWidth(); + m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth(); } if (m_windowmenu.isVisible())

@@ -2398,7 +2372,7 @@

if (Fluxbox::instance()->getIgnoreBorder() && !(me.state & Mod1Mask) // really should check for exact matches && !(isMoving() || isResizing())) { - int borderw = screen().rootTheme().borderWidth(); + int borderw = frame().window().borderWidth(); if (me.x_root < (frame().x() + borderw) || me.y_root < (frame().y() + borderw) || me.x_root > (frame().x() + (int)frame().width() + borderw) ||

@@ -2430,8 +2404,8 @@ } else {

int dx = me.x_root - m_button_grab_x, dy = me.y_root - m_button_grab_y; - dx -= screen().rootTheme().borderWidth(); - dy -= screen().rootTheme().borderWidth(); + dx -= frame().window().borderWidth(); + dy -= frame().window().borderWidth(); // Warp to next or previous workspace?, must have moved sideways some int moved_x = me.x_root - m_last_resize_x;

@@ -2561,8 +2535,8 @@ // we already grabed and started to drag'n'drop tab

// so we update drag'n'drop-rectangle int dx = me.x_root - 1, dy = me.y_root - 1; - dx -= screen().rootTheme().borderWidth(); - dy -= screen().rootTheme().borderWidth(); + dx -= frame().window().borderWidth(); + dy -= frame().window().borderWidth(); if (screen().getEdgeSnapThreshold()) { int drx = screen().width() - (dx + 1);

@@ -2699,6 +2673,21 @@ }

// commit current decoration values to actual displayed things void FluxboxWindow::applyDecorations() { + frame().clientArea().setBorderWidth(0); // client area bordered by other things + + unsigned int borderW = 0; + if (decorations.border) + borderW = screen().rootTheme().borderWidth(); + + if (frame().window().borderWidth() != borderW) { + frame().window().setBorderWidth(borderW); + frame().titlebar().setBorderWidth(borderW); + frame().handle().setBorderWidth(borderW); + frame().gripLeft().setBorderWidth(borderW); + frame().gripRight().setBorderWidth(borderW); + frame().reconfigure(); + } + // we rely on frame not doing anything if it is already shown/hidden if (decorations.titlebar) frame().showTitlebar();

@@ -2710,7 +2699,6 @@ frame().showHandle();

else frame().hideHandle(); - // is reconfigure needed here? } void FluxboxWindow::toggleDecoration() {
M src/Window.hhsrc/Window.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: Window.hh,v 1.75 2003/05/24 13:01:48 fluxgen Exp $ +// $Id: Window.hh,v 1.76 2003/05/26 04:24:24 rathnor Exp $ #ifndef WINDOW_HH #define WINDOW_HH

@@ -373,7 +373,6 @@ void setNetWMAttributes();

void associateClientWindow(); void createWinButtons(); void decorateLabel(); - void positionWindows(); void restoreGravity(); void setGravityOffsets();