mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 01:38:17 +02:00
fixed unsetting csFocusing
git-svn-id: trunk@5425 -
This commit is contained in:
parent
6d336f79e0
commit
b437ff2c8d
@ -1302,12 +1302,13 @@ begin
|
||||
Result:=true;
|
||||
|
||||
if not (csFocusing in Control.ControlState) then begin
|
||||
// prevent looping
|
||||
Control.ControlState := Control.ControlState + [csFocusing];
|
||||
try
|
||||
// change focus
|
||||
|
||||
finally
|
||||
Control.ControlState := Control.ControlState + [csFocusing];
|
||||
Control.ControlState := Control.ControlState - [csFocusing];
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1601,6 +1602,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.134 2004/04/23 11:18:28 mattias
|
||||
fixed unsetting csFocusing
|
||||
|
||||
Revision 1.133 2004/04/10 17:58:57 mattias
|
||||
implemented mainunit hints for include files
|
||||
|
||||
|
@ -1768,7 +1768,7 @@ Begin
|
||||
Assert(False, Format('Trace:[TWinControl.WndPRoc] %s --> LM_SETFOCUS', [ClassName]));
|
||||
Form := GetParentForm(Self);
|
||||
{$IFDEF VerboseFocus}
|
||||
writeln('TWinControl.WndProc A ',Name,':',ClassName);
|
||||
writeln('TWinControl.WndProc LM_SetFocus ',Name,':',ClassName);
|
||||
{$ENDIF}
|
||||
if (Form <> nil) and not Form.SetFocusedControl(Self) then Exit;
|
||||
Message.Result:=0;
|
||||
@ -1777,7 +1777,12 @@ Begin
|
||||
LM_KILLFOCUS:
|
||||
begin
|
||||
Assert(False, Format('Trace:[TWinControl.WndPRoc] %s --> _KILLFOCUS', [ClassName]));
|
||||
if csFocusing in ControlState then Exit;
|
||||
if csFocusing in ControlState then begin
|
||||
{$IFDEF VerboseFocus}
|
||||
writeln('TWinControl.WndProc LM_KillFocus during focusing ',Name,':',ClassName);
|
||||
{$ENDIF}
|
||||
Exit;
|
||||
end;
|
||||
Message.Result:=0;
|
||||
end;
|
||||
|
||||
@ -2603,6 +2608,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure TWinControl.WMSetFocus(var Message: TLMSetFocus);
|
||||
Begin
|
||||
//writeln('TWinControl.WMSetFocus A ',Name,':',ClassName);
|
||||
Assert(False, Format('Trace: %s', [ClassName]));
|
||||
DoEnter;
|
||||
end;
|
||||
@ -2616,6 +2622,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWinControl.WMKillFocus(var Message: TLMKillFocus);
|
||||
begin
|
||||
//writeln('TWinControl.WMKillFocus A ',Name,':',ClassName);
|
||||
Assert(False, Format('Trace: %s', [ClassName]));
|
||||
DoExit;
|
||||
end;
|
||||
@ -3471,6 +3478,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.221 2004/04/23 11:18:28 mattias
|
||||
fixed unsetting csFocusing
|
||||
|
||||
Revision 1.220 2004/04/20 23:39:01 marc
|
||||
* Fixed setting of TWincontrol.Text during load
|
||||
|
||||
|
@ -863,7 +863,6 @@ begin
|
||||
//TODO: fill in old focus
|
||||
FillChar(Mess,SizeOf(Mess),0);
|
||||
Mess.msg := LM_SETFOCUS;
|
||||
Assert(False, Format('Trace:TODO: [gtkfocusCB] %s finish', [TObject(Data).ClassName]));
|
||||
DeliverMessage(Data, Mess);
|
||||
|
||||
Result:=true;
|
||||
@ -957,7 +956,6 @@ begin
|
||||
|
||||
FillChar(Mess,SizeOf(Mess),0);
|
||||
Mess.msg := LM_KILLFOCUS;
|
||||
|
||||
//TODO: fill in new focus
|
||||
Assert(False, Format('Trace:TODO: [gtkkillfocusCB] %s finish', [TObject(Data).ClassName]));
|
||||
DeliverMessage(Data, Mess);
|
||||
@ -1995,11 +1993,9 @@ var
|
||||
LCLComponent: TObject;
|
||||
begin
|
||||
if (Data=nil) then ;
|
||||
BeginGDKErrorTrap;
|
||||
gdk_window_set_events(GetControlWindow(Widget),
|
||||
gdk_window_get_events(GetControlWindow(Widget))
|
||||
or GDK_KEY_RELEASE_MASK or GDK_KEY_PRESS_MASK);
|
||||
EndGDKErrorTrap;
|
||||
LCLComponent:=GetLCLObject(Widget);
|
||||
if LCLComponent is TCommonDialog then
|
||||
TCommonDialog(LCLComponent).DoShow;
|
||||
@ -3070,6 +3066,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.228 2004/04/23 11:18:28 mattias
|
||||
fixed unsetting csFocusing
|
||||
|
||||
Revision 1.227 2004/04/19 10:06:56 mattias
|
||||
fixed illegal ancestor search
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user