add back focusLast
This commit is contained in:
parent
f791f9a35e
commit
f595277f1c
3 changed files with 10 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
gboolean config_focus_new;
|
gboolean config_focus_new;
|
||||||
gboolean config_focus_follow;
|
gboolean config_focus_follow;
|
||||||
|
gboolean config_focus_last;
|
||||||
guint config_focus_delay;
|
guint config_focus_delay;
|
||||||
guint config_focus_raise;
|
guint config_focus_raise;
|
||||||
|
|
||||||
|
@ -196,6 +197,8 @@ static void parse_focus(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
|
||||||
config_focus_new = parse_bool(doc, n);
|
config_focus_new = parse_bool(doc, n);
|
||||||
if ((n = parse_find_node("followMouse", node)))
|
if ((n = parse_find_node("followMouse", node)))
|
||||||
config_focus_follow = parse_bool(doc, n);
|
config_focus_follow = parse_bool(doc, n);
|
||||||
|
if ((n = parse_find_node("focusLast", node)))
|
||||||
|
config_focus_last = parse_bool(doc, n);
|
||||||
if ((n = parse_find_node("focusDelay", node)))
|
if ((n = parse_find_node("focusDelay", node)))
|
||||||
config_focus_delay = parse_int(doc, n) * 1000;
|
config_focus_delay = parse_int(doc, n) * 1000;
|
||||||
if ((n = parse_find_node("raiseOnFocus", node)))
|
if ((n = parse_find_node("raiseOnFocus", node)))
|
||||||
|
@ -479,6 +482,7 @@ void config_startup(ObParseInst *i)
|
||||||
{
|
{
|
||||||
config_focus_new = TRUE;
|
config_focus_new = TRUE;
|
||||||
config_focus_follow = FALSE;
|
config_focus_follow = FALSE;
|
||||||
|
config_focus_last = TRUE;
|
||||||
config_focus_delay = 0;
|
config_focus_delay = 0;
|
||||||
config_focus_raise = FALSE;
|
config_focus_raise = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,9 @@ struct _ObParseInst;
|
||||||
extern gboolean config_focus_new;
|
extern gboolean config_focus_new;
|
||||||
/*! Focus windows when the mouse enters them */
|
/*! Focus windows when the mouse enters them */
|
||||||
extern gboolean config_focus_follow;
|
extern gboolean config_focus_follow;
|
||||||
|
/*! Should focus stay under the mouse when there is nothing focused or go to
|
||||||
|
the last used window */
|
||||||
|
extern gboolean config_focus_last;
|
||||||
/*! Timeout for focusing windows on focus follows mouse, in microseconds */
|
/*! Timeout for focusing windows on focus follows mouse, in microseconds */
|
||||||
extern guint config_focus_delay;
|
extern guint config_focus_delay;
|
||||||
/*! If windows should automatically be raised when they are focused in
|
/*! If windows should automatically be raised when they are focused in
|
||||||
|
|
|
@ -167,8 +167,9 @@ void focus_fallback(ObFocusFallbackType type)
|
||||||
*/
|
*/
|
||||||
focus_set_client(NULL);
|
focus_set_client(NULL);
|
||||||
|
|
||||||
if (config_focus_follow && focus_under_pointer())
|
if (!config_focus_last && config_focus_follow)
|
||||||
return;
|
if (focus_under_pointer())
|
||||||
|
return;
|
||||||
|
|
||||||
if (type == OB_FOCUS_FALLBACK_UNFOCUSING && old) {
|
if (type == OB_FOCUS_FALLBACK_UNFOCUSING && old) {
|
||||||
/* try for transient relations */
|
/* try for transient relations */
|
||||||
|
|
Loading…
Reference in a new issue