mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 04:30:46 +01:00
Linux: cefclient: Fix crash when creating popup window (issue #1006)
This commit is contained in:
parent
c64898f9fc
commit
49c149c20b
@ -162,7 +162,7 @@ void BrowserWindowStdGtk::Hide() {
|
|||||||
void BrowserWindowStdGtk::SetBounds(int x, int y, size_t width, size_t height) {
|
void BrowserWindowStdGtk::SetBounds(int x, int y, size_t width, size_t height) {
|
||||||
REQUIRE_MAIN_THREAD();
|
REQUIRE_MAIN_THREAD();
|
||||||
|
|
||||||
if (browser_) {
|
if (xdisplay_ && browser_) {
|
||||||
::Window xwindow = browser_->GetHost()->GetWindowHandle();
|
::Window xwindow = browser_->GetHost()->GetWindowHandle();
|
||||||
DCHECK(xwindow);
|
DCHECK(xwindow);
|
||||||
SetXWindowBounds(xdisplay_, xwindow, x, y, width, height);
|
SetXWindowBounds(xdisplay_, xwindow, x, y, width, height);
|
||||||
|
@ -369,6 +369,7 @@ void RootWindowGtk::CreateRootWindow(const CefBrowserSettings& settings,
|
|||||||
|
|
||||||
// Set the Display associated with the browser.
|
// Set the Display associated with the browser.
|
||||||
::Display* xdisplay = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(window_));
|
::Display* xdisplay = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(window_));
|
||||||
|
CHECK(xdisplay);
|
||||||
if (with_osr_) {
|
if (with_osr_) {
|
||||||
static_cast<BrowserWindowOsrGtk*>(browser_window_.get())
|
static_cast<BrowserWindowOsrGtk*>(browser_window_.get())
|
||||||
->set_xdisplay(xdisplay);
|
->set_xdisplay(xdisplay);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user