all repos — fluxbox @ 19e4d6eb042d5a48e755ee6b168d7e9fee3bcc8a

custom fork of the fluxbox windowmanager

fixed bug in configureRequestEvent and some minor indent
fluxgen fluxgen
commit

19e4d6eb042d5a48e755ee6b168d7e9fee3bcc8a

parent

6072177888cf5cad55bb843a88e80b493e8fd60c

1 files changed, 39 insertions(+), 35 deletions(-)

jump to
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.111 2003/01/09 22:18:06 fluxgen Exp $ +// $Id: Window.cc,v 1.112 2003/01/10 20:20:37 fluxgen Exp $ #include "Window.hh"

@@ -776,7 +776,7 @@ //move the tab and the chain

if (tab) tab->setPosition(); - // if (! moving) + // if (! moving) send_event = true; }

@@ -1572,7 +1572,7 @@ }

void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) { - if (ne.window == client.window && (! ne.override_redirect) && (visible)) { + if (ne.window == client.window && !ne.override_redirect && visible) { Fluxbox *fluxbox = Fluxbox::instance(); fluxbox->grab(); if (! validateClient())

@@ -1734,49 +1734,53 @@ }

void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) { - if (cr.window == client.window) { - if (! validateClient()) - return; + if (cr.window != client.window) + return; - int cx = m_frame.x(), cy = m_frame.y(); - unsigned int cw = m_frame.width(), ch = m_frame.height(); + if (! validateClient()) + return; - if (cr.value_mask & CWBorderWidth) - client.old_bw = cr.border_width; + int cx = m_frame.x(), cy = m_frame.y(); + unsigned int cw = m_frame.width(), ch = m_frame.height(); - if (cr.value_mask & CWX) - cx = cr.x;// - frame_mwm_border_w - screen->getBorderWidth(); + if (cr.value_mask & CWBorderWidth) + client.old_bw = cr.border_width; - if (cr.value_mask & CWY) - cy = cr.y - m_frame.titlebar().height(); // - frame_mwm_border_w - screen->getBorderWidth(); + if (cr.value_mask & CWX) + cx = cr.x;// - frame_mwm_border_w - screen->getBorderWidth(); - if (cr.value_mask & CWWidth) - cw = cr.width;// + (frame_mwm_border_w * 2); + if (cr.value_mask & CWY) + cy = cr.y - m_frame.titlebar().height(); // - frame_mwm_border_w - screen->getBorderWidth(); - if (cr.value_mask & CWHeight) { - ch = cr.height; - } + if (cr.value_mask & CWWidth) + cw = cr.width;// + (frame_mwm_border_w * 2); - if (m_frame.x() != cx || m_frame.y() != cy || - m_frame.width() != cw || m_frame.height() != ch) { - moveResize(cx, cy, cw, ch); - } + if (cr.value_mask & CWHeight) + ch = cr.height; + + if (m_frame.x() != cx || m_frame.y() != cy || + m_frame.width() != cw || m_frame.height() != ch) { + // the request is for client window so we resize the frame to it first + frame().resizeForClient(cw, ch); + move(cx, cy); + + } - if (cr.value_mask & CWStackMode) { - switch (cr.detail) { - case Above: - case TopIf: - default: - raise(); - break; + if (cr.value_mask & CWStackMode) { + switch (cr.detail) { + case Above: + case TopIf: + default: + raise(); + break; - case Below: - case BottomIf: - lower(); - break; - } + case Below: + case BottomIf: + lower(); + break; } } + }