Event/conf: Add focus_follow_movement [misc] option requested by pl_
This commit is contained in:
parent
1e35777c18
commit
041e9ec20d
@ -159,6 +159,7 @@ conf_misc_section(void)
|
|||||||
conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").bool;
|
conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").bool;
|
||||||
conf.raiseswitch = fetch_opt_first(sec, "false", "raiseswitch").bool;
|
conf.raiseswitch = fetch_opt_first(sec, "false", "raiseswitch").bool;
|
||||||
conf.focus_fmouse = fetch_opt_first(sec, "true", "focus_follow_mouse").bool;
|
conf.focus_fmouse = fetch_opt_first(sec, "true", "focus_follow_mouse").bool;
|
||||||
|
conf.focus_fmov = fetch_opt_first(sec, "false", "focus_follow_movement").bool;
|
||||||
conf.focus_pclick = fetch_opt_first(sec, "true", "focus_pointer_click").bool;
|
conf.focus_pclick = fetch_opt_first(sec, "true", "focus_pointer_click").bool;
|
||||||
conf.status_timing = fetch_opt_first(sec, "1", "status_timing").num;
|
conf.status_timing = fetch_opt_first(sec, "1", "status_timing").num;
|
||||||
conf.status_path = fetch_opt_first(sec, "", "status_path").str;
|
conf.status_path = fetch_opt_first(sec, "", "status_path").str;
|
||||||
|
|||||||
18
src/event.c
18
src/event.c
@ -625,6 +625,23 @@ unmapnotify(XUnmapEvent *ev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** XMotionNotify handle event
|
||||||
|
* \param ev XMotionEvent pointer
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
motionnotify(XMotionEvent *ev)
|
||||||
|
{
|
||||||
|
Client *c;
|
||||||
|
|
||||||
|
if(!conf.focus_fmouse || !conf.focus_fmov)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if((c = client_gb_win(ev->subwindow)))
|
||||||
|
client_focus(c);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/** Key grabbing function
|
/** Key grabbing function
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@ -667,6 +684,7 @@ getevent(XEvent ev)
|
|||||||
case MapNotify: mapnotify(&ev.xmap); break;
|
case MapNotify: mapnotify(&ev.xmap); break;
|
||||||
case MapRequest: maprequest(&ev.xmaprequest); break;
|
case MapRequest: maprequest(&ev.xmaprequest); break;
|
||||||
case MappingNotify: mappingnotify(&ev.xmapping); break;
|
case MappingNotify: mappingnotify(&ev.xmapping); break;
|
||||||
|
case MotionNotify: motionnotify(&ev.xmotion); break;
|
||||||
case PropertyNotify: propertynotify(&ev.xproperty); break;
|
case PropertyNotify: propertynotify(&ev.xproperty); break;
|
||||||
case ReparentNotify: reparentnotify(&ev.xreparent); break;
|
case ReparentNotify: reparentnotify(&ev.xreparent); break;
|
||||||
case SelectionClear: selectionclearevent(&ev.xselectionclear); break;
|
case SelectionClear: selectionclearevent(&ev.xselectionclear); break;
|
||||||
|
|||||||
@ -383,6 +383,7 @@ typedef struct
|
|||||||
Bool raisefocus;
|
Bool raisefocus;
|
||||||
Bool raiseswitch;
|
Bool raiseswitch;
|
||||||
Bool focus_fmouse;
|
Bool focus_fmouse;
|
||||||
|
Bool focus_fmov;
|
||||||
Bool focus_pclick;
|
Bool focus_pclick;
|
||||||
Bool ignore_next_client_rules;
|
Bool ignore_next_client_rules;
|
||||||
Bool tagautohide;
|
Bool tagautohide;
|
||||||
|
|||||||
2
wmfsrc
2
wmfsrc
@ -11,7 +11,9 @@
|
|||||||
raisefocus = true
|
raisefocus = true
|
||||||
raiseswitch = false
|
raiseswitch = false
|
||||||
focus_follow_mouse = true
|
focus_follow_mouse = true
|
||||||
|
focus_follow_movement = false
|
||||||
opacity = 255
|
opacity = 255
|
||||||
|
|
||||||
# focus_pointer_click: click on unfocused client area:
|
# focus_pointer_click: click on unfocused client area:
|
||||||
# true -- default, set focus
|
# true -- default, set focus
|
||||||
# false -- click go to client; including dockapps
|
# false -- click go to client; including dockapps
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user