-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all,
This patch enables you to create and stay in an empty view, as long as it is the currently focused one. That is, if the currently focused view is empty and another view becomes focused, then the empty view will be destroyed. AFAIK, wmii-4 will have or already has this same behavior. You create an empty view via the "view NAME_OF_VIEW" command: echo -n view nonexistent_view | wmiir write /ctl As usual, if the given view name already exists, then it just becomes focused. Cheers. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFFDQKjmV9O7RYnKMcRAlSZAJ4hOnP246ppbOS67PCAPDIsgeN5fACghYMM nMjXAYLoEKANBHicWfqiX0w= =zc/+ -----END PGP SIGNATURE-----
diff -bcr wmii-3.1.orig/cmd/wm/view.c wmii-3.1.new/cmd/wm/view.c *** wmii-3.1.orig/cmd/wm/view.c 2006-06-17 04:44:30.000000000 -0700 --- wmii-3.1.new/cmd/wm/view.c 2006-09-17 01:02:07.000000000 -0700 *************** *** 167,176 **** void select_view(char *arg) { ! View *v = view_of_name(arg); ! if(!v) ! return; ! focus_view(v); } static Bool --- 167,174 ---- void select_view(char *arg) { ! focus_view(get_view(arg)); ! update_views(); } static Bool *************** *** 342,348 **** { unsigned int i; for(i = 0; i < view.size; i++) ! if(is_empty(view.data[i])) return view.data[i]; return nil; } --- 340,346 ---- { unsigned int i; for(i = 0; i < view.size; i++) ! if(is_empty(view.data[i]) && view.data[i] != view.data[sel]) return view.data[i]; return nil; } *************** *** 372,382 **** } } ! while((v = next_empty_view())) { ! if(v == old) ! old = nil; destroy_view(v); - } if(old) focus_view(old); --- 370,377 ---- } } ! while((v = next_empty_view())) destroy_view(v); if(old) focus_view(old);
_______________________________________________ wmii@wmii.de mailing list http://wmii.de/cgi-bin/mailman/listinfo/wmii