diff --git a/lcl/interfaces/gtk2/gtk2wscalendar.pp b/lcl/interfaces/gtk2/gtk2wscalendar.pp index 67c4275fe6..a95a38c3d0 100644 --- a/lcl/interfaces/gtk2/gtk2wscalendar.pp +++ b/lcl/interfaces/gtk2/gtk2wscalendar.pp @@ -150,9 +150,14 @@ var CalendarCtrl: TCustomCalendar; CalendarWidget: PGtkCalendar; begin + // When the user drags a day number, the gtk2 starts a mouse capture. + // when the TCalendar is on a TDateEdit, the LCL destroys the widget while the + // gtk is still capturing. Result: The capture hangs. + // thaw it: CalendarCtrl:=TCustomCalendar(AWinControl); CalendarWidget:=GetCalendar(CalendarCtrl); gtk_calendar_thaw(CalendarWidget); + inherited DestroyHandle(AWinControl); end;