summaryrefslogtreecommitdiff
path: root/app/cwm/mousefunc.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2008-07-11 14:21:29 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2008-07-11 14:21:29 +0000
commit7bd488e7c78e06de5f445f4f2669397298dbfb9c (patch)
tree0684416aa66987b30b47fcde37d467d0ae4a7422 /app/cwm/mousefunc.c
parentb8d1b4702426abb5c0ce0b5ea49d5874e1fd1e47 (diff)
spacing, declaration lineup to be consistent throughout cwm,
readability, and a bit of knf. ok oga@
Diffstat (limited to 'app/cwm/mousefunc.c')
-rw-r--r--app/cwm/mousefunc.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c
index e4e8e9b07..e0b6b575d 100644
--- a/app/cwm/mousefunc.c
+++ b/app/cwm/mousefunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: mousefunc.c,v 1.2 2008/06/25 22:44:42 oga Exp $
+ * $Id: mousefunc.c,v 1.3 2008/07/11 14:21:28 okan Exp $
*/
#include "headers.h"
@@ -63,10 +63,12 @@ mousefunc_menu_group(struct client_ctx *cc, void *arg)
void
mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
{
- struct menu *mi;
- struct menu_q menuq;
- char *wname;
- struct client_ctx *old_cc = client_current();
+ struct client_ctx *old_cc;
+ struct menu *mi;
+ struct menu_q menuq;
+ char *wname;
+
+ old_cc = client_current();
TAILQ_INIT(&menuq);
TAILQ_FOREACH(cc, &Clientq, entry)
@@ -96,19 +98,21 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
if (old_cc != NULL)
client_ptrsave(old_cc);
client_ptrwarp(cc);
- } else
+ } else {
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
xfree(mi);
}
+ }
}
void
mousefunc_menu_cmd(struct client_ctx *cc, void *arg)
{
- struct menu *mi;
- struct menu_q menuq;
- struct cmd *cmd;
+ struct menu *mi;
+ struct menu_q menuq;
+ struct cmd *cmd;
+
conf_reload(&Conf);
TAILQ_INIT(&menuq);