mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 19:47:30 +01:00
LCL-GTK2: Remove idle callback before destroying a widget. Issue #32985, patch from accorp.
git-svn-id: trunk@57580 -
This commit is contained in:
parent
e0f2c26d32
commit
32a9ec15de
@ -4718,21 +4718,21 @@ begin
|
||||
GtkWindow:=gtk_widget_get_toplevel(Widget);
|
||||
if GtkWidgetIsA(GtkWindow,GTK_TYPE_WINDOW)
|
||||
and (GetNearestLCLObject(PGtkWindow(GtkWindow)^.Focus_Widget)=Sender)
|
||||
then begin
|
||||
then
|
||||
gtk_window_set_focus(PGtkWindow(GtkWindow),nil);
|
||||
end;
|
||||
|
||||
if Sender is TCommonDialog then begin
|
||||
if Sender is TCommonDialog then
|
||||
DestroyCommonDialogAddOns(TCommonDialog(Sender));
|
||||
end;
|
||||
|
||||
if GTK_IS_ENTRY(Widget) then
|
||||
g_idle_remove_by_data(Widget);
|
||||
|
||||
// destroy widget and properties
|
||||
DestroyConnectedWidget(Widget,false);
|
||||
|
||||
// clean up unneeded containers
|
||||
if Sender is TMenuItem then begin
|
||||
if Sender is TMenuItem then
|
||||
DestroyEmptySubmenu(TMenuItem(Sender));
|
||||
end;
|
||||
|
||||
// mouse click messages
|
||||
if LastMouse.WinControl=Sender then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user