mirror of
https://github.com/aphrody-labs/cef.git
synced 2026-10-14 05:09:23 +00:00
- Fail at startup when --use-native is used with Wayland (unsupported, see #2804). - Remove X11 runtime dependencies from the OSR path. - Match the GDK backend to the Ozone platform. - Keep GDK OpenGL enabled with OSR by presetting GDK_GL (see https://crrev.com/7c29ce9003d87). - Share IsRunningOnWayland() between cefclient and ceftests and match Chromium detection logic.
25 lines
761 B
C++
25 lines
761 B
C++
// Copyright (c) 2026 The Chromium Embedded Framework Authors. All rights
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
// can be found in the LICENSE file.
|
|
|
|
#include "tests/shared/browser/util_linux.h"
|
|
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
|
|
#include "tests/shared/common/client_switches.h"
|
|
|
|
namespace client {
|
|
|
|
bool IsRunningOnWayland(CefRefPtr<CefCommandLine> command_line) {
|
|
if (command_line->HasSwitch(switches::kOzonePlatform)) {
|
|
return command_line->GetSwitchValue(switches::kOzonePlatform) == "wayland";
|
|
}
|
|
|
|
// Same default as ui::SetOzonePlatformForLinuxIfNeeded().
|
|
const char* session_type = getenv("XDG_SESSION_TYPE");
|
|
return session_type && strcmp(session_type, "wayland") == 0;
|
|
}
|
|
|
|
} // namespace client
|