mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -05:00
Stop using GTK3-deprecated gdk_get_display().
The new way is gdk_display_get_name(gdk_display_get_default()), which returns a const char * rather than a char *, so I've also had to fiddle with the prototype and call sites of get_x_display(). (Also included gtkcompat.h into uxputty.c, since that wanted to call gdk_get_display() but didn't previously include it.)
This commit is contained in:
@ -759,7 +759,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Conf *conf,
|
||||
close(pty_utmp_helper_pipe); /* just let the child process die */
|
||||
pty_utmp_helper_pipe = -1;
|
||||
} else {
|
||||
char *location = get_x_display(pty->frontend);
|
||||
const char *location = get_x_display(pty->frontend);
|
||||
int len = strlen(location)+1, pos = 0; /* +1 to include NUL */
|
||||
while (pos < len) {
|
||||
int ret = write(pty_utmp_helper_pipe, location+pos, len - pos);
|
||||
|
Reference in New Issue
Block a user