return gdk_get_display();
}
+long get_windowid(void *frontend)
+{
+ Terminal *term = (Terminal *)frontend;
+ struct gui_data *inst = (struct gui_data *)(term->frontend);
+ return (long)GDK_WINDOW_XWINDOW(inst->area->window);
+}
+
static void help(FILE *fp) {
if(fprintf(fp,
"pterm option summary:\n"
{
int slavefd;
pid_t pid, pgrp;
+ long windowid;
pty_frontend = frontend;
*backend_handle = NULL; /* we can't sensibly use this, sadly */
}
}
+ windowid = get_windowid(pty_frontend);
+
/*
* Fork and execute the command.
*/
sprintf(term_env_var, "TERM=%s", cfg->termtype);
putenv(term_env_var);
}
+ {
+ char windowid_env_var[40];
+ sprintf(windowid_env_var, "WINDOWID=%ld", windowid);
+ putenv(windowid_env_var);
+ }
/*
* SIGINT and SIGQUIT may have been set to ignored by our
* parent, particularly by things like sh -c 'pterm &' and
/* Things pty.c needs from pterm.c */
char *get_x_display(void *frontend);
int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */
+long get_windowid(void *frontend);
/* Things uxstore.c needs from pterm.c */
char *x_get_default(const char *key);