You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add native Wayland support (explicit opt-in, X11/XWayland default)
On Wayland sessions, X11/XWayland is used by default so CEF's browser widget
is parented inside a GTK frame window that the window manager decorates normally
(title bar, resize handles, close button).
Native Wayland mode (ozone-platform=wayland) is available as an explicit opt-in
via switches={"ozone-platform": "wayland"} in cef.Initialize(). It is not
auto-selected from WAYLAND_DISPLAY because CEF's NativeWidgetDelegate
hardcodes params.remove_standard_frame=true / params.type=TYPE_CONTROL on the
standalone Wayland path, which prevents the Wayland compositor from adding
Server Side Decorations.
Key changes:
- _linux_apply_initialize_defaults(): detects wayland vs x11 mode; defaults
to X11/XWayland; native Wayland only when ozone-platform=wayland is explicit
- Initialize(): skips GTK/X11 init and X11ErrorHandlers in Wayland mode
- CreateBrowserSync(): in Wayland mode passes parent=0 so CEF creates its own
xdg_toplevel; in X11 mode creates a GTK frame window as before
- HideX11ShellWindow(): unmaps the empty CefWindowX11 shell that CEF creates
alongside the NativeWidgetDelegate content window when SUPPORTS_OZONE_X11 is
compiled in, leaving only the content-bearing Wayland window visible
- _linux_register_wayland_close_handler(): installs a DoClose callback that
calls QuitMessageLoop() since CloseHostWindow() is a no-op on Wayland
- _linux_wayland_message_loop(): bare GLib loop driving CefDoMessageLoopWork()
every 10 ms without any GTK window; QuitMessageLoop() calls g_main_loop_quit()
- WindowInfo.SetAsChild: suppresses spurious handle=0 warning in Wayland mode
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments