Gtk2: fixed crash when GtkDeviceContext widget isn't mapped yet. Use default root win as drawable. issue #27795

git-svn-id: trunk@48643 -
This commit is contained in:
zeljko 2015-04-06 11:04:26 +00:00
parent 3360f8a0b2
commit 7ab1cdbe1f

View File

@ -527,7 +527,7 @@ begin
FWidget := AWidget;
FPixbuf := nil;
if AWidget = nil then
if (AWidget = nil) or not GTK_WIDGET_MAPPED(AWidget) then
begin
// screen: ToDo: multiple desktops
FDrawable := gdk_screen_get_root_window(gdk_screen_get_default);