tangled
alpha
login
or
join now
jcs.org
/
qconsole
0
fork
atom
quake-style console with xterm
0
fork
atom
overview
issues
pulls
pipelines
Default to calculating window height by screen size
jcs.org
8 years ago
bb5985e4
987f94de
+7
-2
1 changed file
expand all
collapse all
unified
split
qconsole.c
+7
-2
qconsole.c
reviewed
···
47
47
48
48
#define MAX_SPEED 10
49
49
#define DEF_SPEED 7
50
50
-
#define DEF_HEIGHT 157
51
50
52
51
#define BORDER 4
53
52
···
96
95
int ch;
97
96
98
97
memset(&main_win, 0, sizeof(struct xinfo));
99
99
-
main_win.height = DEF_HEIGHT;
100
98
main_win.speed = DEF_SPEED;
101
99
main_win.cur_direction = DIR_UP;
100
100
+
101
101
+
/* will get set according to screen height if not overridden by -h */
102
102
+
main_win.height = 0;
102
103
103
104
while ((ch = getopt(argc, argv, "dh:s:")) != -1)
104
105
switch (ch) {
···
196
197
errx(1, "Unable to open display %s", XDisplayName(display));
197
198
198
199
XSetErrorHandler ((XErrorHandler) x_error_handler);
200
200
+
201
201
+
if (main_win.height == 0)
202
202
+
main_win.height = DisplayHeight(main_win.dpy,
203
203
+
main_win.screen) / 5;
199
204
200
205
main_win.screen = DefaultScreen(main_win.dpy);
201
206
main_win.width = main_win.dpy_width = DisplayWidth(main_win.dpy,