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); NewWidget:=gtk_gl_area_new(AttrList);
end; end;
Result:=HWND(NewWidget); Result:=HWND(NewWidget);
PGtkobject(NewWidget)^.flags:=PGtkobject(NewWidget)^.flags or GTK_CAN_FOCUS;
{$IFDEF LCLGtk} {$IFDEF LCLGtk}
TGTKWidgetSet(WidgetSet).FinishComponentCreate(AWinControl,NewWidget,true); TGTKWidgetSet(WidgetSet).FinishComponentCreate(AWinControl,NewWidget,true);
{$ELSE} {$ELSE}

View File

@ -77,7 +77,7 @@ type
OpenGLControl2.SharedControl:=OpenGLControl1; OpenGLControl2.SharedControl:=OpenGLControl1;
OpenGLControl3.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 OpenGLControl1.SharingControls will contain OpenGLControl2 and
OpenGLControl3. OpenGLControl3.
} }

View File

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