diff --git a/main_wayland.cpp b/main_wayland.cpp --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -750,20 +750,10 @@ if (hasWindowedOption && parser.isSet(windowedOption)) { if (hasX11Option && parser.isSet(x11DisplayOption)) { deviceIdentifier = parser.value(x11DisplayOption).toUtf8(); - } else if (!(hasWaylandOption && parser.isSet(waylandDisplayOption))) { - deviceIdentifier = qgetenv("DISPLAY"); - } - if (!deviceIdentifier.isEmpty()) { pluginName = KWin::s_x11Plugin; - } else if (hasWaylandOption) { - if (parser.isSet(waylandDisplayOption)) { - deviceIdentifier = parser.value(waylandDisplayOption).toUtf8(); - } else { - deviceIdentifier = qgetenv("WAYLAND_DISPLAY"); - } - if (!deviceIdentifier.isEmpty()) { - pluginName = KWin::s_waylandPlugin; - } + } else if (hasWaylandOption && parser.isSet(waylandDisplayOption)) { + deviceIdentifier = parser.value(waylandDisplayOption).toUtf8(); + pluginName = KWin::s_waylandPlugin; } } if (hasFramebufferOption && parser.isSet(framebufferOption)) {