diff --git a/lcl/interfaces/gtk/gtkcallback.inc b/lcl/interfaces/gtk/gtkcallback.inc index 4c0973444c..49d9bca3a4 100644 --- a/lcl/interfaces/gtk/gtkcallback.inc +++ b/lcl/interfaces/gtk/gtkcallback.inc @@ -179,8 +179,11 @@ begin end; end; - if not (csDesigning in TComponent(Data).ComponentState) then + if (csDesigning in TComponent(Data).ComponentState) then begin + //DebugLn(['gtkRealizeCB ',dbgsName(TComponent(Data)),' ',GetWidgetDebugReport(Widget)]); + end else begin RealizeAccelerator(TComponent(Data),Widget); + end; end; end; diff --git a/lcl/interfaces/gtk/gtkproc.inc b/lcl/interfaces/gtk/gtkproc.inc index 3ab8511e05..d06a04fdac 100644 --- a/lcl/interfaces/gtk/gtkproc.inc +++ b/lcl/interfaces/gtk/gtkproc.inc @@ -391,6 +391,10 @@ var ClassLen: Integer; begin Result:=''; + if Widget=nil then begin + Result:='nil'; + exit; + end; if (gtk_object_get_class(Widget)=nil) then begin Result:=''; exit; @@ -7655,7 +7659,7 @@ begin // the client area (like menu) Result := gtk_vbox_new(False, 0); - If FormWidget = nil then + if FormWidget = nil then FormWidget := Result; // Create the form client area (a scrolled window with a gtklayout diff --git a/lcl/interfaces/gtk2/gtk2wsstdctrls.pp b/lcl/interfaces/gtk2/gtk2wsstdctrls.pp index 85f02e32f9..88d2c20c01 100644 --- a/lcl/interfaces/gtk2/gtk2wsstdctrls.pp +++ b/lcl/interfaces/gtk2/gtk2wsstdctrls.pp @@ -992,8 +992,9 @@ begin AEntry := PGtkObject(GetComboBoxEntry(PGtkWidget(ComboWidget))); APrivate := PGtkComboBoxPrivate(ComboWidget^.priv); AButton := PGtkObject(APrivate^.button); - - // we have to remove the handler gtk sets up because we will never get the mouse down messages + //DebugLn(['TGtk2WSCustomComboBox.SetCallbacks ',dbgsName(AWinControl),' AButton=',GetWidgetClassName(PGtkWidget(AButton)),' ComboWidget=',GetWidgetClassName(PGtkWidget(ComboWidget))]); + + // we have to remove the handler gtk sets up to get the mouse down messages BtnPressID := g_signal_lookup('button_press_event', GTK_TYPE_COMBO_BOX); if AButton<>nil then begin HandlerID := g_signal_handler_find(AButton, G_SIGNAL_MATCH_ID, BtnPressID, 0, nil, nil, nil);