compositor: Set WAYLAND_DISPLAY if we're given a --socket argument

This lets us run multiple compositors (nested or on different VTs).

https://bugs.freedesktop.org/show_bug.cgi?id=46629
This commit is contained in:
Kristian Høgsberg 2012-07-31 14:54:48 -04:00
parent 7b884bc0de
commit 3df6384c3a

View File

@ -3536,6 +3536,8 @@ int main(int argc, char *argv[])
config_file = config_file_path("weston.ini");
parse_config_file(config_file, cs, ARRAY_LENGTH(cs), shell);
if (socket_name)
setenv("WAYLAND_DISPLAY", socket_name, 1);
backend_init = load_module(backend, "backend_init", &backend_module);
if (!backend_init)