TWinControl descendant can now get focus by SetFocus under gtk

git-svn-id: trunk@8719 -
This commit is contained in:
mattias 2006-02-07 22:16:32 +00:00
parent fb3672a053
commit 5b2f90fcda
3 changed files with 3 additions and 1 deletions

View File

@ -710,6 +710,7 @@ begin
NewWidget:=gtk_gl_area_new(AttrList);
end;
Result:=HWND(NewWidget);
PGtkobject(NewWidget)^.flags:=PGtkobject(NewWidget)^.flags or GTK_CAN_FOCUS;
{$IFDEF LCLGtk}
TGTKWidgetSet(WidgetSet).FinishComponentCreate(AWinControl,NewWidget,true);
{$ELSE}

View File

@ -77,7 +77,7 @@ type
OpenGLControl2.SharedControl:=OpenGLControl1;
OpenGLControl3.SharedControl:=OpenGLControl1;
After OpenGLControl1.SharingControlCount will be two and
After this OpenGLControl1.SharingControlCount will be two and
OpenGLControl1.SharingControls will contain OpenGLControl2 and
OpenGLControl3.
}

View File

@ -8487,6 +8487,7 @@ begin
// grab the focus to the parent window
NewTopLevelWidget := gtk_widget_get_toplevel(NewFocusWidget);
if (Screen<>nil)
and (Screen.GetCurrentModalForm<>nil)
and (GetNearestLCLObject(NewTopLevelWidget)<>Screen.GetCurrentModalForm)
then begin
{$IFDEF VerboseFocus}