mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 21:12:47 -05:00
X forwarding changes:
- new function platform_get_x_display() to find a sensible local display. On Unix, the Gtk apps weren't taking account of --display when determining where to send forwarded X traffic. - explicitly document that leaving X display location blank in config tries to do something sensible (and that it's now blank by default) - don't override X11Display setting in plink, since that's more properly done later [originally from svn r4604]
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#include "putty.h"
|
||||
#include "storage.h"
|
||||
@ -105,6 +106,21 @@ char *make_default_wintitle(char *hostname)
|
||||
return dupcat(hostname, " - PuTTY", NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* X11-forwarding-related things suitable for Gtk app.
|
||||
*/
|
||||
|
||||
const char platform_x11_best_transport[] = "unix";
|
||||
|
||||
char *platform_get_x_display(void) {
|
||||
const char *display;
|
||||
/* Try to take account of --display and what have you. */
|
||||
if (!(display = gdk_get_display()))
|
||||
/* fall back to traditional method */
|
||||
display = getenv("DISPLAY");
|
||||
return dupstr(display);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
extern int pt_main(int argc, char **argv);
|
||||
|
Reference in New Issue
Block a user