From a11575f9596d12ef7c18c2af3031388028bdbd7d Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 21 Dec 2003 22:42:31 +0000 Subject: update last time --- src/fluxbox.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1e1ef36..9cad953 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.213 2003/12/21 16:23:59 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.214 2003/12/21 22:42:31 fluxgen Exp $ #include "fluxbox.hh" @@ -764,18 +764,26 @@ void Fluxbox::handleEvent(XEvent * const e) { } - // update key/mouse screen before we enter other eventhandlers + // update key/mouse screen and last time before we enter other eventhandlers if (e->type == KeyPress || e->type == KeyRelease) { m_keyscreen = searchScreen(e->xkey.root); } else if (e->type == ButtonPress || e->type == ButtonRelease || e->type == MotionNotify ) { + if (e->type == MotionNotify) + m_last_time = e->xmotion.time; + else + m_last_time = e->xbutton.time; + m_mousescreen = searchScreen(e->xbutton.root); } else if (e->type == EnterNotify || e->type == LeaveNotify) { + m_last_time = e->xcrossing.time; m_mousescreen = searchScreen(e->xcrossing.root); - } + } else if (e->type == PropertyNotify) + m_last_time = e->xproperty.time; + // try FbTk::EventHandler first FbTk::EventManager::instance()->handleEvent(*e); -- cgit v0.11.2