From 8142e5a38927fc140802c714123572d05bd99cc8 Mon Sep 17 00:00:00 2001 From: gotmor Date: Mon, 11 Jun 2007 18:12:57 +0000 Subject: get rid of exposetitle and exposeslave actions, we handle those without wrapper functions git-svn-id: http://dzen.googlecode.com/svn/trunk@82 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- main.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index af5128b..b393373 100644 --- a/main.c +++ b/main.c @@ -1,8 +1,9 @@ /* -* (C)opyright MMVII Robert Manea -* See LICENSE file for license details. -* -*/ + * (C)opyright MMVII Robert Manea + * See LICENSE file for license details. + * + */ + #include "dzen.h" #include "action.h" @@ -401,12 +402,11 @@ handle_xev(void) { && ev.xexpose.window == dzen.title_win.win) drawheader(NULL); if(ev.xexpose.window == dzen.slave_win.win) - do_action(exposeslave); + x_draw_body();; for(i=0; i < dzen.slave_win.max_lines; i++) if(ev.xcrossing.window == dzen.slave_win.line[i]) - do_action(exposeslave); + x_draw_body(); } - XSync(dzen.dpy, False); break; case EnterNotify: if(dzen.slave_win.ismenu) { @@ -419,7 +419,6 @@ handle_xev(void) { do_action(entertitle); if(ev.xcrossing.window == dzen.slave_win.win) do_action(enterslave); - XSync(dzen.dpy, False); break; case LeaveNotify: if(dzen.slave_win.ismenu) { @@ -433,7 +432,6 @@ handle_xev(void) { if(ev.xcrossing.window == dzen.slave_win.win) { do_action(leaveslave); } - XSync(dzen.dpy, False); break; case ButtonRelease: if(dzen.slave_win.ismenu) { @@ -458,10 +456,8 @@ handle_xev(void) { do_action(button5); break; } - XSync(dzen.dpy, False); break; } - XFlush(dzen.dpy); } static void @@ -480,7 +476,7 @@ handle_newl(void) { x_draw_body(); } /* forget state if window was unmapped */ - else if(wa.map_state == IsUnmapped || !dzen.slave_win.last_line_vis) { + if(wa.map_state == IsUnmapped || !dzen.slave_win.last_line_vis) { dzen.slave_win.first_line_vis = 0; dzen.slave_win.last_line_vis = 0; } @@ -669,13 +665,10 @@ main(int argc, char *argv[]) { if(!setlocale(LC_ALL, "") || !XSupportsLocale()) puts("dzen: locale not available, expect problems with fonts.\n"); - if(action_string) { - char edef[] = "exposet=exposetitle;exposes=exposeslave"; - fill_ev_table(edef); + if(action_string) fill_ev_table(action_string); - } else { - char edef[] = "exposet=exposetitle;exposes=exposeslave;" - "entertitle=uncollapse;leaveslave=collapse;" + else { + char edef[] = "entertitle=uncollapse;leaveslave=collapse;" "button1=menuexec;button2=togglestick;button3=exit:13;" "button4=scrollup;button5=scrolldown"; fill_ev_table(edef); -- cgit v1.2.3-54-g00ecf