Peter wrote:Hmm, I wonder if it is possible to use JavaScript to restore the navigation entries, using something like "pushState"?
void SetXWindowVisible(::Window xwindow, bool visible) {
::Display* xdisplay = cef_get_xdisplay();
// Retrieve the atoms required by the below XChangeProperty call.
const char* kAtoms[] = {"_NET_WM_STATE", "ATOM", "_NET_WM_STATE_HIDDEN"};
Atom atoms[3];
int result =
XInternAtoms(xdisplay, const_cast<char**>(kAtoms), 3, false, atoms);
if (!result)
NOTREACHED();
if (!visible) {
// Set the hidden property state value.
scoped_ptr<Atom[]> data(new Atom[1]);
data[0] = atoms[2];
XChangeProperty(xdisplay, xwindow,
atoms[0], // name
atoms[1], // type
32, // size in bits of items in 'value'
PropModeReplace,
reinterpret_cast<const unsigned char*>(data.get()),
1); // num items
} else {
// Set an empty array of property state values.
XChangeProperty(xdisplay, xwindow,
atoms[0], // name
atoms[1], // type
32, // size in bits of items in 'value'
PropModeReplace, NULL,
0); // num items
}
}
void SetXWindowVisible(::Window xwindow, bool visible) {
::Display* xdisplay = cef_get_xdisplay();
if (!visible)
XUnmapWindow(xdisplay, xwindow);
else
XMapWindow(xdisplay, xwindow);
}
Peter wrote:Or rather, the question is:
Can I safely replace`SetXWindowVisible()` from browser_window_std_gtk.cc that looks like this:
Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 60 guests