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