all repos — fluxbox @ c3846743fba060716b9090d3684fb273464ab2ae

custom fork of the fluxbox windowmanager

fix some sizing issues with gravity fixes
simonb simonb
commit

c3846743fba060716b9090d3684fb273464ab2ae

parent

aa589f3bdc2044571a7181ebac3f2a3e8156aa11

4 files changed, 11 insertions(+), 12 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0rc3: *06/07/04: + * Fix some sizing issues from gravity change patch (Simon) + FbWinFrame.hh/cc Window.cc * Auto-grouped windows using groups file didn't raise (Thanks ac2dc, bug #1449608) Workspace.cc
M src/FbWinFrame.ccsrc/FbWinFrame.cc

@@ -241,7 +241,7 @@ moveResize(0, 0, width, height, false, true);

} // need an atomic moveresize where possible -void FbWinFrame::moveResizeForClient(int x, int y, unsigned int width, unsigned int height, bool move, bool resize, int win_gravity, unsigned int client_bw) { +void FbWinFrame::moveResizeForClient(int x, int y, unsigned int width, unsigned int height, int win_gravity, unsigned int client_bw, bool move, bool resize) { // total height for frame if (resize) // these fns check if the elements are "on"

@@ -253,7 +253,7 @@ moveResize(x, y, width, height, move, resize);

} void FbWinFrame::resizeForClient(unsigned int width, unsigned int height, int win_gravity, unsigned int client_bw) { - moveResizeForClient(0, 0, width, height, false, true, win_gravity, client_bw); + moveResizeForClient(0, 0, width, height, win_gravity, client_bw, false, true); } void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int height, bool move, bool resize) {
M src/FbWinFrame.hhsrc/FbWinFrame.hh

@@ -104,7 +104,7 @@

// for when there needs to be an atomic move+resize operation void moveResizeForClient(int x, int y, unsigned int width, unsigned int height, - bool move = true, bool resize = true, int win_gravity=ForgetGravity, unsigned int client_bw = 0); + int win_gravity=ForgetGravity, unsigned int client_bw = 0, bool move = true, bool resize = true); // can elect to ignore move or resize (mainly for use of move/resize individual functions void moveResize(int x, int y,
M src/Window.ccsrc/Window.cc

@@ -495,11 +495,6 @@ functions.resize = functions.maximize = false;

decorations.tab = false; //no tab for this window } - - if (m_client->normal_hint_flags & (PPosition|USPosition)) { - frame().gravityTranslate(wattrib.x, wattrib.y, m_client->gravity(), m_client->old_bw, false); - } - associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height, m_client->gravity(), m_client->old_bw); Fluxbox::instance()->attachSignals(*this);

@@ -543,8 +538,6 @@ if (wattrib.height <= 0)

wattrib.height = 1; */ - - // if we're a transient then we should be on the same layer as our parent if (m_client->isTransient() && m_client->transientFor()->fbwindow() &&

@@ -561,9 +554,13 @@ m_client->transientFor()->fbwindow()->title()<<endl;

} #endif // DEBUG + int real_width = frame().width(); + int real_height = frame().height() - frame().titlebarHeight() - frame().handleHeight(); + m_client->applySizeHints(real_width, real_height); + real_height += frame().titlebarHeight() + frame().handleHeight(); if (!place_window) - moveResize(frame().x(), frame().y(), frame().width(), frame().height()); + moveResize(frame().x(), frame().y(), real_width, real_height); screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); setWorkspace(m_workspace_number);

@@ -1376,7 +1373,7 @@

// magic to detect if moved during initialisation if (!isInitialized()) m_old_pos_x = 1; - frame().moveResizeForClient(new_x, new_y, new_width, new_height, true, true, gravity, client_bw); + frame().moveResizeForClient(new_x, new_y, new_width, new_height, gravity, client_bw); setFocusFlag(focused); shaded = false; sendConfigureNotify();