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.raiseswitch = fetch_opt_first(sec, "false", "raiseswitch").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.status_timing = fetch_opt_first(sec, "1", "status_timing").num;
|
||||
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;
|
||||
}
|
||||
|
||||
/** 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
|
||||
*/
|
||||
void
|
||||
@ -667,6 +684,7 @@ getevent(XEvent ev)
|
||||
case MapNotify: mapnotify(&ev.xmap); break;
|
||||
case MapRequest: maprequest(&ev.xmaprequest); break;
|
||||
case MappingNotify: mappingnotify(&ev.xmapping); break;
|
||||
case MotionNotify: motionnotify(&ev.xmotion); break;
|
||||
case PropertyNotify: propertynotify(&ev.xproperty); break;
|
||||
case ReparentNotify: reparentnotify(&ev.xreparent); break;
|
||||
case SelectionClear: selectionclearevent(&ev.xselectionclear); break;
|
||||
|
||||
@ -383,6 +383,7 @@ typedef struct
|
||||
Bool raisefocus;
|
||||
Bool raiseswitch;
|
||||
Bool focus_fmouse;
|
||||
Bool focus_fmov;
|
||||
Bool focus_pclick;
|
||||
Bool ignore_next_client_rules;
|
||||
Bool tagautohide;
|
||||
|
||||
12
wmfsrc
12
wmfsrc
@ -7,11 +7,13 @@
|
||||
# @include "~/.config/wmfs/menu-wmfsrc"
|
||||
|
||||
[misc]
|
||||
font = "dejavu-10"
|
||||
raisefocus = true
|
||||
raiseswitch = false
|
||||
focus_follow_mouse = true
|
||||
opacity = 255
|
||||
font = "dejavu-10"
|
||||
raisefocus = true
|
||||
raiseswitch = false
|
||||
focus_follow_mouse = true
|
||||
focus_follow_movement = false
|
||||
opacity = 255
|
||||
|
||||
# focus_pointer_click: click on unfocused client area:
|
||||
# true -- default, set focus
|
||||
# false -- click go to client; including dockapps
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user