Resolves: rhbz#1285364 urls cannot be opened under wayland

because we're setting DISPLAY always, and under wayland that resolves to
"wayland", not the original ":0" so the gtk2 gvfs-open eventually called open
xdg-open cannot open the correct display

Change-Id: I246120f2430b92cd2d3e5003445aa4c9da4f6a68
This commit is contained in:
Caolán McNamara
2015-12-15 15:14:13 +00:00
parent 1cb87bf384
commit 3bb7557d54

View File

@@ -730,6 +730,7 @@ void GtkData::Init()
aOrigXIOErrorHandler = XSetIOErrorHandler(XIOErrorHdl);
#endif
#if !GTK_CHECK_VERSION(3,0,0)
/*
* if a -display switch was used, we need
* to set the environment accoringly since
@@ -740,6 +741,7 @@ void GtkData::Init()
const gchar *name = gdk_display_get_name( pGdkDisp );
OUString envValue(name, strlen(name), aEnc);
osl_setEnvironment(envVar.pData, envValue.pData);
#endif
GtkSalDisplay *pDisplay = new GtkSalDisplay( pGdkDisp );
SetDisplay( pDisplay );