Commit 9ae5ad4f authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa
Browse files

do not call gdk_window_get_frame_extents on OFFSCREEN_WINDOWS, because...

do not call gdk_window_get_frame_extents on OFFSCREEN_WINDOWS, because underlying function is not implemented, which
results in crash.

CCBUG: 301517
parent a28f5122
......@@ -878,10 +878,21 @@ namespace Oxygen
GdkWindow* topLevel = gdk_window_get_toplevel( window );
if( topLevel && GDK_IS_WINDOW( topLevel ) )
{
GdkRectangle rect = {0, 0, -1, -1};
gdk_window_get_frame_extents( topLevel, &rect );
if( w ) *w = rect.width;
if( h ) *h = rect.height;
if( gdk_window_get_window_type( topLevel ) == GDK_WINDOW_OFFSCREEN )
{
if( w ) *w = gdk_window_get_width(topLevel);
if( h ) *h = gdk_window_get_height(topLevel);
} else {
GdkRectangle rect = {0, 0, -1, -1};
gdk_window_get_frame_extents( topLevel, &rect );
if( w ) *w = rect.width;
if( h ) *h = rect.height;
}
}
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment