… | |
… | |
119 | |
119 | |
120 | // temporarily replace the process environment |
120 | // temporarily replace the process environment |
121 | extern char **environ; |
121 | extern char **environ; |
122 | extern char **rxvt_environ; // the original environ pointer |
122 | extern char **rxvt_environ; // the original environ pointer |
123 | |
123 | |
124 | struct temp_environ |
124 | inline void set_environ (stringvec *envv) |
125 | { |
125 | { |
126 | char **prev; |
|
|
127 | |
|
|
128 | temp_environ (const stringvec *envv) |
|
|
129 | : prev(environ) |
|
|
130 | { |
|
|
131 | if (envv) |
126 | if (envv) |
132 | environ = (char **)envv->begin (); |
127 | environ = (char **)envv->begin (); |
133 | } |
128 | } |
134 | |
129 | |
135 | temp_environ (char **env) |
130 | inline void set_environ (char **envv) |
136 | : prev(environ) |
131 | { |
137 | { |
|
|
138 | if (env) |
132 | if (envv) |
139 | environ = env; |
133 | environ = envv; |
140 | } |
134 | } |
141 | |
|
|
142 | ~temp_environ () |
|
|
143 | { |
|
|
144 | environ = prev; |
|
|
145 | } |
|
|
146 | }; |
|
|
147 | |
|
|
148 | #define TEMP_ENV temp_environ temp_environ (envv) |
|
|
149 | |
135 | |
150 | /* |
136 | /* |
151 | ***************************************************************************** |
137 | ***************************************************************************** |
152 | * STRUCTURES AND TYPEDEFS |
138 | * STRUCTURES AND TYPEDEFS |
153 | ***************************************************************************** |
139 | ***************************************************************************** |
… | |
… | |
1222 | #endif |
1208 | #endif |
1223 | |
1209 | |
1224 | // modifies first argument(!) |
1210 | // modifies first argument(!) |
1225 | void paste (char *data, unsigned int len); |
1211 | void paste (char *data, unsigned int len); |
1226 | |
1212 | |
1227 | void flush (); |
1213 | long vt_emask, vt_emask_perl; |
|
|
1214 | |
|
|
1215 | void vt_select_input () |
|
|
1216 | { |
|
|
1217 | XSelectInput (display->display, vt, vt_emask | vt_emask_perl); |
|
|
1218 | } |
1228 | |
1219 | |
1229 | #if TRANSPARENT |
1220 | #if TRANSPARENT |
1230 | void rootwin_cb (XEvent &xev); |
1221 | void rootwin_cb (XEvent &xev); |
1231 | xevent_watcher rootwin_ev; |
1222 | xevent_watcher rootwin_ev; |
1232 | #endif |
1223 | #endif |
1233 | |
1224 | |
1234 | void x_cb (XEvent &xev); |
1225 | void x_cb (XEvent &xev); |
|
|
1226 | void flush (); |
1235 | xevent_watcher termwin_ev; |
1227 | xevent_watcher termwin_ev; |
1236 | xevent_watcher vt_ev; |
1228 | xevent_watcher vt_ev; |
1237 | #ifdef HAVE_SCROLLBARS |
1229 | #ifdef HAVE_SCROLLBARS |
1238 | xevent_watcher scrollbar_ev; |
1230 | xevent_watcher scrollbar_ev; |
1239 | #endif |
1231 | #endif |