mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 02:20:40 +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;
|
||||
FPixbuf := nil;
|
||||
|
||||
if (AWidget = nil) or not GTK_WIDGET_MAPPED(AWidget) then
|
||||
if (AWidget = nil) then
|
||||
begin
|
||||
// screen: ToDo: multiple desktops
|
||||
FDrawable := gdk_screen_get_root_window(gdk_screen_get_default);
|
||||
@ -573,6 +573,8 @@ begin
|
||||
|
||||
FDrawable := AWindow;
|
||||
// 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user