summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-12-28 02:00:33 +0100
committerportix <portix@gmx.net>2011-12-28 02:00:33 +0100
commitb21be615c1aed463426ac6cb0d1356d70fa5d3c2 (patch)
treef6d59da018c83ce41df49fba7ca165113f026b3b /src/commands.c
parentd1832eed7a58b43aeece4b9cb462b3c2fcdfe3bd (diff)
downloaddwb-b21be615c1aed463426ac6cb0d1356d70fa5d3c2.zip
Removing not needed dwb_false; new command 'visible'
--HG-- branch : experimental
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands.c b/src/commands.c
index ecb5913b..48a13046 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -869,8 +869,11 @@ commands_toggle_protected(KeyMap *km, Arg *arg) {
DwbStatus
commands_toggle_lock_protect(KeyMap *km, Arg *arg) {
GList *gl = dwb.state.nummod < 0 ? dwb.state.fview : g_list_nth(dwb.state.views, dwb.state.nummod-1);
- VIEW(gl)->status->lockprotect ^= arg->n;
+ View *v = VIEW(gl);
+ v->status->lockprotect ^= arg->n;
dwb_tab_label_set_text(gl, NULL);
+ if (arg->n & LP_VISIBLE && gl != dwb.state.fview)
+ gtk_widget_set_visible(v->scroll, LP_VISIBLE(v));
return STATUS_OK;
}
/*}}}*/