Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding windowing #6016

Merged
merged 8 commits into from May 15, 2015
Prev

try fixing macos embedding build

  • Loading branch information
Mike Blumenkrantz
Mike Blumenkrantz committed May 15, 2015
commit 6f6945aafc3e6bc43873a1c949592bebd25ec0dd
@@ -102,7 +102,7 @@ impl ServoCefBrowser {
pub fn new(window_info: &cef_window_info_t, client: CefClient) -> ServoCefBrowser {
let frame = ServoCefFrame::new().as_cef_interface();
let host = ServoCefBrowserHost::new(client.clone()).as_cef_interface();
let mut window_handle: cef_window_handle_t = 0;
let mut window_handle: cef_window_handle_t = get_null_window_handle();

let servo_browser = if window_info.windowless_rendering_enabled == 0 {
let glutin_window = glutin_app::create_window();
@@ -148,7 +148,7 @@ impl ServoCefBrowserExtensions for CefBrowser {

self.downcast().host.set_browser((*self).clone());
self.downcast().frame.set_browser((*self).clone());
if window_info.parent_window != 0 {
if window_info.windowless_rendering_enabled == 0 {
self.downcast().host.initialize_compositing();
}
}
@@ -184,6 +184,15 @@ impl ServoCefBrowserExtensions for CefBrowser {
}
}

#[cfg(target_os="macos")]
pub fn get_null_window_handle() -> cef_window_handle_t {
ptr::null_mut()
}
#[cfg(target_os="linux")]
pub fn get_null_window_handle() -> cef_window_handle_t {
0
}

pub fn update() {
BROWSERS.with(|browsers| {
for browser in browsers.borrow().iter() {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.