Merge branch 'master' into bacardi55

This commit is contained in:
Raphael Khaiat 2011-03-11 17:17:19 +01:00
commit 4d39413f56
6 changed files with 52 additions and 8 deletions

View File

@ -1297,13 +1297,19 @@ client_unmanage(Client *c)
{
/* Arrange */
for(i = 0; i < screen_count() && !b; ++i)
if(c->tag == (uint)seltag[i] || tags[i][seltag[i]].tagad & TagFlag(c->tag))
if(c->tag == (uint)seltag[i])
{
b = True;
break;
}
else if(tags[i][seltag[i]].tagad & TagFlag(c->tag))
{
tags[i][seltag[i]].layout.func(c->screen);
break;
}
if(b)
{
tags[c->screen][c->tag].layout.func(c->screen);
}
else
{
tags[c->screen][c->tag].request_update = True;
@ -1419,6 +1425,20 @@ uicb_client_screen_prev(uicb_t cmd)
return;
}
/** Change client of screen to n
* \param cmd uicb_t type screen
*/
void
uicb_client_screen_set(uicb_t cmd)
{
(void)cmd;
CHECK(sel);
client_set_screen(sel, atoi(cmd));
return;
}
/** Move a client
*\param cmd uicb_t type
*/

View File

@ -42,6 +42,7 @@ const func_name_list_t func_list[] =
{"client_swap_prev", uicb_client_swap_prev },
{"client_screen_next", uicb_client_screen_next },
{"client_screen_prev", uicb_client_screen_prev },
{"client_screen_set", uicb_client_screen_set },
{"client_focus_right", uicb_client_focus_right },
{"client_focus_left" , uicb_client_focus_left },
{"client_focus_top", uicb_client_focus_top },
@ -157,6 +158,7 @@ conf_misc_section(void)
conf.font = fetch_opt_first(sec, "sans-9", "font").str;
conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").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;

View File

@ -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;

View File

@ -382,6 +382,7 @@ typedef struct
uint opacity;
Bool raisefocus;
Bool focus_fmouse;
Bool focus_fmov;
Bool focus_pclick;
Bool ignore_next_client_rules;
Bool tagautohide;

View File

@ -194,6 +194,7 @@ void uicb_client_focus_bottom(uicb_t cmd);
void uicb_client_kill(uicb_t);
void uicb_client_screen_next(uicb_t);
void uicb_client_screen_prev(uicb_t);
void uicb_client_screen_set(uicb_t);
void uicb_client_move(uicb_t cmd);
void uicb_client_resize(uicb_t cmd);
void uicb_ignore_next_client_rules(uicb_t cmd);

12
wmfsrc
View File

@ -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