mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 05:21:46 +02:00
LCL-Gtk2: Avoid Gtk-CRITICAL
warnings on Linux, issue #41611.
Avoid warnings like:
(project1:153785): Gtk-CRITICAL **: 09:35:29.899:
IA__gtk_paint_flat_box: assertion 'style->depth ==
gdk_drawable_get_depth (window)' failed
This is a regression after commit
3185572fdf
, which fixed crash on OpenBSD
(issue #41244).
Now the change from the above commit is active only for the OpenBSD
platform.
This commit is contained in:
parent
30dd771375
commit
d611e0c2a3
@ -8185,7 +8185,11 @@ begin
|
||||
WidgetName := 'gtk-tooltip-lcl';
|
||||
StyleObject^.Owner := Tp;
|
||||
Tp := nil;
|
||||
// The following line causes `Gtk-CRITICAL` warning on Linux, issue #41611.
|
||||
// It seems to be only needed on OpenBSD, issue #41244.
|
||||
{$IF DEFINED(OPENBSD)}
|
||||
AddToStyleWindow:=false;
|
||||
{$ENDIF}
|
||||
end
|
||||
else
|
||||
If CompareText(WName,LazGtkStyleNames[lgsHScale])=0 then begin
|
||||
|
@ -263,6 +263,7 @@ begin
|
||||
BP_PUSHBUTTON:
|
||||
begin
|
||||
Result.Widget := GetStyleWidget(lgsButton);
|
||||
// style is always overwritten to lgsButton to avoid problems with TSpeedButton color, issue #22901
|
||||
Result.Style := GetStyle(lgsButton);
|
||||
Result.State := GtkButtonMap[Details.State];
|
||||
if Details.State = PBS_PRESSED then
|
||||
@ -482,6 +483,7 @@ begin
|
||||
end;
|
||||
teToolTip:
|
||||
begin
|
||||
// style is always overwritten to avoid problems with theming, issue #41611
|
||||
Result.Style := GetStyle(lgsTooltip);
|
||||
Result.Widget := GetStyleWidget(lgsTooltip);
|
||||
Result.State := GTK_STATE_NORMAL;
|
||||
|
Loading…
Reference in New Issue
Block a user