From f42d39cc351c1d6c6b424d451e0cc5ddcec8cab3 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 11 Feb 2007 22:03:27 +0000 Subject: still fixing bug with session.ignoreBorder --- src/Window.cc | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 1393c99..00da9d4 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2687,24 +2687,39 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { || frame().label() == me.window || frame().tabcontainer() == me.window || frame().handle() == me.window - || frame().window() == me.window - && !Fluxbox::instance()->getIgnoreBorder()); + || frame().window() == me.window); if (Fluxbox::instance()->getIgnoreBorder() && !(me.state & Fluxbox::instance()->getModKey()) // really should check for exact matches && !(isMoving() || isResizing() || m_attaching_tab != 0)) { int borderw = frame().window().borderWidth(); //!! TODO(tabs): the below test ought to be in FbWinFrame + // if mouse is currently on the window border, ignore it if ((me.x_root < (frame().x() + borderw) || me.y_root < (frame().y() + borderw) || - me.x_root > (frame().x() + (int)frame().width() + borderw) || - me.y_root > (frame().y() + (int)frame().height() + borderw)) && - ( !frame().externalTabMode() || - (me.x_root < (frame().tabcontainer().x() + borderw) || - me.y_root < (frame().tabcontainer().y() + borderw) || - me.x_root > (frame().tabcontainer().x() + (int)frame().tabcontainer().width() + borderw) || - me.y_root > (frame().tabcontainer().y() + (int)frame().tabcontainer().height() + borderw) - ))) + me.x_root >= (frame().x() + (int)frame().width() + borderw) || + me.y_root >= (frame().y() + (int)frame().height() + borderw)) + && (!frame().externalTabMode() || + (me.x_root < (frame().tabcontainer().x() + borderw) || + me.y_root < (frame().tabcontainer().y() + borderw) || + me.x_root >= (frame().tabcontainer().x() + + (int)frame().tabcontainer().width() + borderw) || + me.y_root >= (frame().tabcontainer().y() + + (int)frame().tabcontainer().height() + borderw))) + // or if mouse was on border when it was last clicked + || (m_last_button_x < (frame().x() + borderw) || + m_last_button_y < (frame().y() + borderw) || + m_last_button_x >= (frame().x() + + (int)frame().width() + borderw) || + m_last_button_y >= (frame().y() + + (int)frame().height() + borderw)) + && (!frame().externalTabMode() || + (m_last_button_x < (frame().tabcontainer().x() + borderw) || + m_last_button_y < (frame().tabcontainer().y() + borderw) || + m_last_button_x >= (frame().tabcontainer().x() + + (int)frame().tabcontainer().width() + borderw) || + m_last_button_y >= (frame().tabcontainer().y() + + (int)frame().tabcontainer().height() + borderw)))) return; } -- cgit v0.11.2