mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 16:20:35 +02:00
Gtk2: create FDrawable on demand, only when FDrawable is nil and widget unmapped yet (usually happens only for TCustomForm). issue #27821
git-svn-id: trunk@48697 -
This commit is contained in:
parent
23b4170169
commit
894fe3d7d4
@ -527,7 +527,7 @@ begin
|
|||||||
FWidget := AWidget;
|
FWidget := AWidget;
|
||||||
FPixbuf := nil;
|
FPixbuf := nil;
|
||||||
|
|
||||||
if (AWidget = nil) or not GTK_WIDGET_MAPPED(AWidget) then
|
if (AWidget = nil) then
|
||||||
begin
|
begin
|
||||||
// screen: ToDo: multiple desktops
|
// screen: ToDo: multiple desktops
|
||||||
FDrawable := gdk_screen_get_root_window(gdk_screen_get_default);
|
FDrawable := gdk_screen_get_root_window(gdk_screen_get_default);
|
||||||
@ -573,6 +573,8 @@ begin
|
|||||||
|
|
||||||
FDrawable := AWindow;
|
FDrawable := AWindow;
|
||||||
// GC is created on demand
|
// GC is created on demand
|
||||||
|
if (FDrawable = nil) and not GTK_WIDGET_MAPPED(AWidget) then
|
||||||
|
FDrawable := gdk_screen_get_root_window(gdk_screen_get_default);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user