mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:19:16 +02:00
reduced focus handling and improved focus setting
git-svn-id: trunk@2242 -
This commit is contained in:
parent
b9e64ccb6a
commit
665c7e910f
@ -6666,17 +6666,24 @@ begin
|
|||||||
write(' TopLvlVisible=',GTK_WIDGET_VISIBLE(PGtkWidget(TopLevel)));
|
write(' TopLvlVisible=',GTK_WIDGET_VISIBLE(PGtkWidget(TopLevel)));
|
||||||
writeln('');
|
writeln('');
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
if (NewFocusWidget<>nil)
|
if (NewFocusWidget<>nil) and GTK_WIDGET_CAN_FOCUS(NewFocusWidget) then begin
|
||||||
and (PGtkWindow(TopLevel)^.Focus_Widget<>NewFocusWidget)
|
if (PGtkWindow(TopLevel)^.Focus_Widget<>NewFocusWidget)
|
||||||
and (GTK_WIDGET_CAN_FOCUS(NewFocusWidget)) then begin
|
then begin
|
||||||
{$IfDef VerboseFocus}
|
{$IfDef VerboseFocus}
|
||||||
writeln(' H SETTING NewFocusWidget=',HexStr(Cardinal(NewFocusWidget),8));
|
writeln(' H SETTING NewFocusWidget=',HexStr(Cardinal(NewFocusWidget),8));
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
gtk_window_set_focus(PGtkWindow(TopLevel),NewFocusWidget);
|
gtk_window_set_focus(PGtkWindow(TopLevel),NewFocusWidget);
|
||||||
{$IfDef VerboseFocus}
|
{$IfDef VerboseFocus}
|
||||||
writeln(' I NewTopLevel FocusWidget=',HexStr(Cardinal(PGtkWindow(TopLevel)^.Focus_Widget),8));
|
writeln(' I NewTopLevel FocusWidget=',HexStr(Cardinal(PGtkWindow(TopLevel)^.Focus_Widget),8),' Success=',PGtkWindow(TopLevel)^.Focus_Widget=NewFocusWidget);
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
end;
|
end;
|
||||||
|
if not gtk_widget_has_focus(NewFocusWidget) then begin
|
||||||
|
{$IfDef VerboseFocus}
|
||||||
|
writeln(' J Grabbing focus');
|
||||||
|
{$EndIf}
|
||||||
|
gtk_widget_grab_focus(NewFocusWidget);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
if GTK_WIDGET_CAN_FOCUS(Widget) then begin
|
if GTK_WIDGET_CAN_FOCUS(Widget) then begin
|
||||||
@ -7945,6 +7952,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.222 2003/03/25 10:45:41 mattias
|
||||||
|
reduced focus handling and improved focus setting
|
||||||
|
|
||||||
Revision 1.221 2003/03/18 13:04:25 mattias
|
Revision 1.221 2003/03/18 13:04:25 mattias
|
||||||
improved focus debugging output
|
improved focus debugging output
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user