Allow windows created by execute actions to steal focus if the user isn't interacting with another window (Fix bug 5419). When the execute action was run, we would say that the user had used the focused at that time. Then when a new window popped up, we'd think the user was busy in the current window and prevent the new one from steal focus. Now the execute action does not update the "user interacted with the focused window" timestamp anymore. So, if they aren't currently typing in some window when they trigger an execute action, and the window appears, it will steal focus.
if no launch time is provided for an application, make one up. if the window is related to other existing windows and one of those windows was the last used then we will give it a launch time equal to the last user time, which will end up giving the window focus probably. else the window is related to other windows, but you are not working in them? seems suspicious, so we will give it a launch time of NOW - STEAL_INTERVAL, so it will be given focus only if we didn't use something else during the steal interval. else the window is all on its own, so we can't judge it. give it a launch time equal to the last user time, so it will probably take focus. this way running things from a terminal will give them focus, but popups without a launch time shouldn't steal focus so easily.
don't steal focus if someone used a window within 1 second ago (instead of 0.5 seconds)
update the user-interaction timestamp when running a (non-interactive) action on the focused window update it at the end of running actions instead of multiple times (once for each action)
fix focus when starting up, especially when replacing another instance of openbox adds a function event_reset_time() that forces event_time() to look for a new (future) timestamp
event_curtime is replaced (publicly) by event_time() This function never returns CurrentTime, which is nice, cuz using CurrentTime for XSetFocus always sucks. If the current XEvent did not have a timestamp, then event_time() will find one. It finds the first timestamp available in the X event queue, meaning the earliest timestamp >= the current (nontimestamped) event. All future events should have a timestamp >= event_time(), so using this in XSetFocus() should not mess up any future calls we make to it. This change seems to work well, as it appears to fix bug #3648.
Add a focus option, unfocusOnLeave that removes focus from a window when the pointer leaves it This uses the same delay to unfocus as is used for focusing on enter
Revert all commits for the Hooks feature to move it to a topic branch. This reverts commit fd2f617be7ff57fcb187daa737f66d243544c8cd. This reverts commit a47d0a53652a96ca1df96fc9268757df1431ae55. This reverts commit a1908e076736e1a618bd305c5963dbfecaa30497. This reverts commit dc2e6f6bf7143a56de360a393b33906735e63625. This reverts commit 985e7dadf9a3ebf4bd265d955c3198e96405e5d2. This reverts commit db781556d63d1a50bd1b1b4b6b5423ef703bf2c7. This reverts commit feec8f663f0a11546c2da87575fecc8a88d97ca1.
Merge branch 'backport' into work Conflicts: openbox/client.c openbox/prop.c openbox/prop.h
Correct a 64-bit bug in event_time_after The code assumed the timestamps had the same domain as the type Xlib uses for them, which is almost never the case with Xlib. Change all involved variables to guint32.
Get hooks working
Merge branch 'backport' into work Conflicts: openbox/client.c openbox/event.c openbox/event.h
Fix some typos and style in client.c, and add a comment. Also moves a comment from many places into one place.
() -> (void) also in .h files, and fix a place that gave arguments when it shouldn't have.
Merge branch 'backport'
new least-intrusive focus stealing prevention
remove old unused variables
super amazing enter event skipping. also mucho fixed for <underMouse>
change in how things are ungrabbed to avoid grabwhilenotify. don't ungrab every key press. just ungrab the passive grab when there is no active grab and we are going to move focus. this should be less intrusive and seems to work
remove a function that is no longer used. and backwards boolean algebra was causing us to not ignore the right enter events