I'm using latest branch 4324 and I'm getting this weird issue on youtube. When you press the full screen button it goes into full screen but only to the limits of my container window. I have cef running inside a java app and on the previous branch I had (branch 4183) It would got to the computer full screen when you hit full screen. Now its limited to the confines of the window.
Something similar happens on cef client, but I have never used it on cefclient so it might have been always the way it used to work.. when you hit fullscreen on cefclient it maximizes the window to cover all screen but it keeps the URL navigation bar (its not really full screen, its just a maximized window).
I have not changed the code for this in years, so I'm not sure there is a new wall to call full screen. Here is the code I call when I get the full screen trigger:
- Code: Select all
void GtkDelegate::EnterFullscreen(CefRefPtr<CefBrowser> browser) {
::Display* xdisplay = cef_get_xdisplay();
::Window x_root_window = DefaultRootWindow(xdisplay);
XWindowAttributes attr;
XGetWindowAttributes(xdisplay, x_root_window, &attr);
// Create new fullscreen parent window for the browser
XSetWindowAttributes swa;
memset(&swa, 0, sizeof (swa));
swa.background_pixmap = None;
swa.override_redirect = true;
m_FullscreenParent = XCreateWindow(
xdisplay, x_root_window,
0, 0, attr.width, attr.height,
0, // border width
CopyFromParent, // depth
InputOutput,
CopyFromParent, // visual
CWBackPixmap | CWOverrideRedirect,
&swa);
Atom wmState = ::XInternAtom(xdisplay, "_NET_WM_STATE", False);
Atom wmFullscreen = ::XInternAtom(xdisplay, "_NET_WM_STATE_FULLSCREEN", False);
XEvent xclient;
memset(&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage;
xclient.xclient.window = m_FullscreenParent;
xclient.xclient.message_type = wmState;
xclient.xclient.format = 32;
xclient.xclient.data.l[0] = 1;
xclient.xclient.data.l[1] = wmFullscreen;
xclient.xclient.data.l[2] = None;
XSendEvent(xdisplay, x_root_window, False,
SubstructureRedirectMask | SubstructureNotifyMask,
&xclient);
// Reparent the browser to fullscreen parent
::Window xwindow = browser->GetHost()->GetWindowHandle();
XReparentWindow(xdisplay, xwindow, m_FullscreenParent, 0, 0);
// Resize the browser to fullscreen size
XWindowChanges changes = {0};
changes.width = attr.width;
changes.height = attr.height;
XConfigureWindow(xdisplay, xwindow, CWHeight | CWWidth, &changes);
XMapWindow(xdisplay, m_FullscreenParent);
}
I would appreciate any inputs if this is a new thing and I need to change the code.. I'm still troubleshooting it, checking which sites behave like this or if this is only limited to youtube.. but I wanted to post a question here in case its something I missed on a recent change.
I actually like to have this as an option, to control how big full screen can go, but for the time being I need to be able to go full screen on all screen.
Best Regards