updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / yeahconsole / yeahconsole_c.patch
blob982ae52a2051102d96890df73ea5dba82cd048b5
1 --- yeahconsole.c.orig 2006-03-11 19:26:00.000000000 +0100
2 +++ yeahconsole.c 2009-09-19 11:43:07.000000000 +0200
3 @@ -48,7 +48,7 @@
4 int revert_to;
5 int screen;
6 int opt_x, opt_width, opt_height, opt_delay, opt_bw, opt_step,
7 - height, opt_restart;
8 + height, opt_restart, opt_restart_hidden;
9 char *opt_color;
10 char *opt_term;
11 KeySym opt_key;
12 @@ -72,7 +72,8 @@
13 XEvent event;
14 int hidden = 1;
15 int fullscreen = 0;
16 - int i, old_height;
17 + int i;
18 + int old_height = 0;
19 Window last_focused, current_focused;
21 /* strip the path from argv[0] if there is one */
22 @@ -190,10 +191,18 @@
23 case UnmapNotify:
24 if (event.xunmap.window == termwin) {
25 if (opt_restart) {
26 + if (opt_restart_hidden) {
27 + roll(UP);
28 + hidden = 1;
29 + }
30 init_xterm(0);
31 XSync(dpy, False);
32 - XSetInputFocus(dpy, termwin, RevertToPointerRoot,
33 - CurrentTime);
34 + if (opt_restart_hidden && last_focused)
35 + XSetInputFocus(dpy, last_focused,
36 + RevertToPointerRoot, CurrentTime);
37 + else
38 + XSetInputFocus(dpy, termwin, RevertToPointerRoot,
39 + CurrentTime);
40 } else {
41 if (last_focused)
42 XSetInputFocus(dpy, last_focused,
43 @@ -264,6 +273,8 @@
44 opt_step = opt ? atoi(opt) : 1;
45 opt = XGetDefault(dpy, progname, "restart");
46 opt_restart = opt ? atoi(opt) : 0;
47 + opt = XGetDefault(dpy, progname, "restartHidden");
48 + opt_restart_hidden = opt ? atoi(opt) : 0;
49 opt = XGetDefault(dpy, progname, "term");
50 opt_term = opt ? opt : "xterm";
51 opt = XGetDefault(dpy, progname, "toggleKey");