mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 05:19:10 +02:00
TWinControl descendant can now get focus by SetFocus under gtk
git-svn-id: trunk@8719 -
This commit is contained in:
parent
fb3672a053
commit
5b2f90fcda
@ -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}
|
||||||
|
@ -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.
|
||||||
}
|
}
|
||||||
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user