From c39f3f6e2cf3623306b7df4ab5a670329d4c4e45 Mon Sep 17 00:00:00 2001 From: gotmor Date: Wed, 9 May 2007 17:43:16 +0000 Subject: added onstart, onquit events git-svn-id: http://dzen.googlecode.com/svn/trunk@12 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- action.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'action.c') diff --git a/action.c b/action.c index 0a65837..c0e090d 100644 --- a/action.c +++ b/action.c @@ -9,9 +9,12 @@ #include #include + struct event_lookup ev_lookup_table[] = { { "exposet", exposetitle}, { "exposes", exposeslave}, + { "onstart", onstart}, + { "onquit", onquit}, { "button1", button1}, { "button2", button2}, { "button3", button3}, @@ -273,6 +276,7 @@ a_scrolldown(char * opt[]) { return 0; } +/* int a_hide(char * opt[]) { if(dzen.title_win.autohide && !dzen.title_win.ishidden) { @@ -290,6 +294,24 @@ a_unhide(char * opt[]) { } return 0; } +*/ +int +a_hide(char * opt[]) { + if(!dzen.title_win.ishidden) { + XResizeWindow(dzen.dpy, dzen.title_win.win, dzen.title_win.width, 1); + dzen.title_win.ishidden = True; + } + return 0; +} + +int +a_unhide(char * opt[]) { + if(dzen.title_win.ishidden) { + XResizeWindow(dzen.dpy, dzen.title_win.win, dzen.title_win.width, dzen.mh); + dzen.title_win.ishidden = False; + } + return 0; +} int a_exec(char * opt[]) { -- cgit v1.2.3-54-g00ecf