layout: Add toggle_free function

This commit is contained in:
Martin Duquesnoy
2008-11-08 23:39:29 +01:00
parent 644c10aa68
commit 528a22b75a
5 changed files with 34 additions and 15 deletions

View File

@@ -40,13 +40,13 @@ func_name_list_t func_list[] =
{"client_kill", uicb_client_kill },
{"client_prev", uicb_client_prev },
{"client_next", uicb_client_next },
{"togglemax", uicb_togglemax },
{"toggle_max", uicb_togglemax },
{"layout_next", uicb_layout_next },
{"layout_prev", uicb_layout_prev },
{"tag", uicb_tag },
{"tag_next", uicb_tag_next },
{"tag_prev", uicb_tag_prev },
{"tagtransfert", uicb_tagtransfert },
{"tag_transfert", uicb_tagtransfert },
{"set_mwfact", uicb_set_mwfact },
{"set_nmaster", uicb_set_nmaster },
{"quit", uicb_quit },
@@ -54,7 +54,8 @@ func_name_list_t func_list[] =
{"mouse_move", uicb_mouse_move },
{"mouse_resize", uicb_mouse_resize },
{"client_raise", uicb_client_raise },
{"tile_switch", uicb_tile_switch }
{"tile_switch", uicb_tile_switch },
{"toggle_free", uicb_togglefree }
};
func_name_list_t layout_list[] =

View File

@@ -339,7 +339,7 @@ getevent(void)
case MapRequest: maprequest(event); break;
case MappingNotify: mapnotify(event); break;
case PropertyNotify: propertynotify(event); break;
//case UnmapNotify: unmapnotify(event); break;
case UnmapNotify: unmapnotify(event); break;
}
return;

View File

@@ -388,7 +388,7 @@ multi_tile(Position type)
if(type == Top || type == Bottom)
cgeo.x = c->geo.x + c->geo.width + border;
else
cgeo.y = c->geo.y + c->geo.height + border + conf.titlebar.height;
cgeo.y = c->geo.y + c->geo.height + border + TBARH;
}
return;
@@ -442,6 +442,22 @@ uicb_tile_switch(uicb_t cmd)
return;
}
void
uicb_togglefree(uicb_t cmd)
{
CHECK(sel);
sel->free = !sel->free;
sel->tile = False;
sel->max = False;
sel->lmax = False;
client_raise(sel);
arrange();
return;
}
void
uicb_togglemax(uicb_t cmd)
{

View File

@@ -181,6 +181,7 @@ Client *nexttiled(Client *c);
/* }}} */
void uicb_tile_switch(uicb_t);
void uicb_togglemax(uicb_t);
void uicb_togglefree(uicb_t cmd);
void uicb_layout_prev(uicb_t);
void uicb_layout_next(uicb_t);
void uicb_set_mwfact(uicb_t);