… | |
… | |
9 | * - extensive modifications |
9 | * - extensive modifications |
10 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
10 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
11 | * - extensive modifications |
11 | * - extensive modifications |
12 | * Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com> |
12 | * Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com> |
13 | * - QNX support |
13 | * - QNX support |
14 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
14 | * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com> |
15 | * |
15 | * |
16 | * This program is free software; you can redistribute it and/or modify |
16 | * This program is free software; you can redistribute it and/or modify |
17 | * it under the terms of the GNU General Public License as published by |
17 | * it under the terms of the GNU General Public License as published by |
18 | * the Free Software Foundation; either version 2 of the License, or |
18 | * the Free Software Foundation; either version 2 of the License, or |
19 | * (at your option) any later version. |
19 | * (at your option) any later version. |
… | |
… | |
391 | pointerBlankDelay = 2; |
391 | pointerBlankDelay = 2; |
392 | #endif |
392 | #endif |
393 | |
393 | |
394 | /* no point having a scrollbar without having any scrollback! */ |
394 | /* no point having a scrollbar without having any scrollback! */ |
395 | if (!saveLines) |
395 | if (!saveLines) |
396 | CLR_OPTION (Opt_scrollBar); |
396 | set_option (Opt_scrollBar, 0); |
397 | |
397 | |
398 | #ifdef PRINTPIPE |
398 | #ifdef PRINTPIPE |
399 | if (!rs[Rs_print_pipe]) |
399 | if (!rs[Rs_print_pipe]) |
400 | rs[Rs_print_pipe] = PRINTPIPE; |
400 | rs[Rs_print_pipe] = PRINTPIPE; |
401 | #endif |
401 | #endif |
… | |
… | |
1032 | #endif |
1032 | #endif |
1033 | }; |
1033 | }; |
1034 | |
1034 | |
1035 | XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0])); |
1035 | XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0])); |
1036 | |
1036 | |
|
|
1037 | #if ENABLE_FRILLS |
|
|
1038 | if (rs[Rs_transient_for]) |
|
|
1039 | XSetTransientForHint (disp, top, (Window)strtol (rs[Rs_transient_for], 0, 0)); |
|
|
1040 | #endif |
|
|
1041 | |
1037 | #if ENABLE_EWMH |
1042 | #if ENABLE_EWMH |
1038 | long pid = getpid (); |
1043 | long pid = getpid (); |
1039 | |
1044 | |
1040 | XChangeProperty (disp, top, |
1045 | XChangeProperty (disp, top, |
1041 | xa[XA_NET_WM_PID], XA_CARDINAL, 32, |
1046 | xa[XA_NET_WM_PID], XA_CARDINAL, 32, |
… | |
… | |
1084 | attributes.bit_gravity = NorthWestGravity; |
1089 | attributes.bit_gravity = NorthWestGravity; |
1085 | XChangeWindowAttributes (disp, vt, CWBitGravity, &attributes); |
1090 | XChangeWindowAttributes (disp, vt, CWBitGravity, &attributes); |
1086 | |
1091 | |
1087 | vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; |
1092 | vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; |
1088 | |
1093 | |
1089 | #ifdef POINTER_BLANK |
|
|
1090 | if (OPTION (Opt_pointerBlank)) |
1094 | if (OPTION (Opt_pointerBlank) |
|
|
1095 | #ifdef ENABLE_PERL |
|
|
1096 | || perl.self |
|
|
1097 | #endif |
|
|
1098 | ) |
1091 | vt_emask |= PointerMotionMask; |
1099 | vt_emask |= PointerMotionMask; |
1092 | else |
1100 | else |
1093 | #endif |
|
|
1094 | vt_emask |= Button1MotionMask | Button3MotionMask; |
1101 | vt_emask |= Button1MotionMask | Button3MotionMask; |
1095 | |
1102 | |
1096 | XSelectInput (disp, vt, vt_emask); |
1103 | XSelectInput (disp, vt, vt_emask); |
1097 | vt_ev.start (display, vt); |
1104 | vt_ev.start (display, vt); |
1098 | |
1105 | |
… | |
… | |
1402 | #if ENABLE_FRILLS |
1409 | #if ENABLE_FRILLS |
1403 | if (rs[Rs_pty_fd]) |
1410 | if (rs[Rs_pty_fd]) |
1404 | { |
1411 | { |
1405 | pty.pty = atoi (rs[Rs_pty_fd]); |
1412 | pty.pty = atoi (rs[Rs_pty_fd]); |
1406 | |
1413 | |
|
|
1414 | if (pty.pty >= 0) |
|
|
1415 | { |
1407 | if (getfd_hook) |
1416 | if (getfd_hook) |
1408 | pty.pty = (*getfd_hook) (pty.pty); |
1417 | pty.pty = (*getfd_hook) (pty.pty); |
1409 | |
1418 | |
1410 | if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) |
1419 | if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) |
1411 | rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); |
1420 | rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); |
|
|
1421 | } |
1412 | } |
1422 | } |
1413 | else |
1423 | else |
1414 | #endif |
1424 | #endif |
1415 | if (!pty.get ()) |
1425 | if (!pty.get ()) |
1416 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1426 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |