wmclockmon: fix typos pointed out by Lintian.
[dockapps.git] / wmjmail / src / jDockApp / jDockApp.c
blob86a4eca7e85fd04f2f96f18a3bac792c4e44595d
1 #include "jDockApp.h"
3 int loop_delay = 1000;
4 int update_delay = 60;
6 void set_update_delay(int i) { update_delay = i; }
7 void set_loop_delay(int i) { loop_delay = i; }
9 int main(int argc, char **argv) {
10 XEvent event;
11 long update_delay_counter;
13 initXwindow(argc, argv);
14 openXwindow(argc, argv, jDockApp_main_xpm, jDockApp_mask_xpm,
15 mask_width, mask_height, "#000000", "#000000", "#000000",
16 "#000000", "#000000"
19 setup(argc, argv);
21 do_update();
23 update_delay_counter = 100000 * update_delay;
25 while(true) {
26 RedrawWindow();
28 while(XPending(display)) {
29 XNextEvent(display, &event);
30 switch(event.type) {
31 case Expose:
32 do_expose();
33 RedrawWindow();
34 break;
35 case ButtonRelease:
36 do_button_release();
37 RedrawWindow();
38 break;
39 case EnterNotify:
40 XSetInputFocus(display,
41 PointerRoot, RevertToParent, CurrentTime);
42 break;
43 case LeaveNotify:
44 XSetInputFocus(display,
45 PointerRoot, RevertToParent, CurrentTime);
46 break;
49 usleep(1000);
50 update_delay_counter -= 1000;
51 if(update_delay_counter<=0) {
52 do_update();
53 update_delay_counter = 100000 * update_delay;
57 return 0;