mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 05:19:02 +01:00
repair VerboseFocus for gtk2
git-svn-id: trunk@13326 -
This commit is contained in:
parent
8c6f42cbe0
commit
79fbbcfde2
@ -603,7 +603,7 @@ begin
|
||||
|
||||
FillChar(Mess,SizeOf(Mess),#0);
|
||||
{$IFDEF VerboseFocus}
|
||||
write('gtkfrmactivateAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
|
||||
write('gtkfrmactivateAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
|
||||
LCLObject:=TObject(data);
|
||||
if LCLObject<>nil then begin
|
||||
if LCLObject is TComponent then begin
|
||||
@ -657,7 +657,7 @@ begin
|
||||
{$ENDIF}
|
||||
if (Widget=nil) or (Event=nil) then ;
|
||||
{$IFDEF VerboseFocus}
|
||||
write('gtkfrmdeactivate Widget=',DbgS(Widget),' ',Event^.theIn,
|
||||
write('gtkfrmdeactivate Widget=',DbgS(Widget),' ',Event^.{$ifdef gtk1}thein{$else}_in{$endif},
|
||||
' GetFocus=',DbgS(Widget));
|
||||
LCLObject:=TControl(GetLCLObject(Widget));
|
||||
if LCLObject<>nil then
|
||||
@ -715,7 +715,7 @@ begin
|
||||
if (Widget=nil) or (Event=nil) then ;
|
||||
//DebugLn('GTKFocusCB ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
|
||||
{$IFDEF VerboseFocus}
|
||||
write('GTKFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
|
||||
write('GTKFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
|
||||
LCLObject:=TObject(data);
|
||||
if LCLObject<>nil then begin
|
||||
if LCLObject is TComponent then begin
|
||||
@ -762,7 +762,7 @@ begin
|
||||
if (Widget=nil) or (Event=nil) then ;
|
||||
//DebugLn('GTKFocusCBAfter ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
|
||||
{$IFDEF VerboseFocus}
|
||||
write('GTKFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
|
||||
write('GTKFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
|
||||
LCLObject:=TObject(data);
|
||||
if LCLObject<>nil then begin
|
||||
if LCLObject is TComponent then begin
|
||||
@ -815,7 +815,7 @@ begin
|
||||
if (Widget=nil) or (Event=nil) then ;
|
||||
//DebugLn('GTKKillFocusCB ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
|
||||
{$IFDEF VerboseFocus}
|
||||
write('GTKillFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
|
||||
write('GTKillFocusCB Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
|
||||
LCLObject:=TObject(data);
|
||||
if LCLObject<>nil then begin
|
||||
if LCLObject is TComponent then begin
|
||||
@ -865,7 +865,7 @@ begin
|
||||
{$ENDIF}
|
||||
//DebugLn('GTKKillFocusCBAfter ',DbgSName(TObject(Data)),' ',GetWidgetDebugReport(Widget));
|
||||
{$IFDEF VerboseFocus}
|
||||
write('GTKillFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.theIn);
|
||||
write('GTKillFocusCBAfter Widget=',DbgS(Widget),' Event^.theIn=',Event^.{$ifdef gtk1}thein{$else}_in{$endif});
|
||||
LCLObject:=TObject(data);
|
||||
if LCLObject<>nil then begin
|
||||
if LCLObject is TComponent then begin
|
||||
@ -2637,7 +2637,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function gtkswitchpage(widget: PGtkWidget; page: Pgtkwidget; pagenum: integer;
|
||||
function GtkSwitchPage(widget: PGtkWidget; page: Pgtkwidget; pagenum: integer;
|
||||
data: gPointer): GBoolean; cdecl;
|
||||
var
|
||||
Mess: TLMNotify;
|
||||
|
||||
@ -8569,7 +8569,7 @@ begin
|
||||
DbgOut(' OldFocus=',GetWidgetDebugReport(PGtkWidget(Result)));
|
||||
DebugLn('');
|
||||
if not GTK_WIDGET_VISIBLE(Widget) then
|
||||
Raise Exception('TGtkWidgetSet.SetFocus: Widget is not visible');
|
||||
raise Exception.Create('TGtkWidgetSet.SetFocus: Widget is not visible');
|
||||
{$EndIf}
|
||||
|
||||
if Result=hWnd then exit;
|
||||
|
||||
@ -561,7 +561,7 @@ function GTKAPIWidgetClient_FocusIn(AWidget: PGTKWidget;
|
||||
Event: PGdkEventFocus): GTKEventResult; cdecl;
|
||||
begin
|
||||
{$IFDEF VerboseFocus}
|
||||
DebugLn('GTKAPIWidgetClient_FocusIn ',DbgS(AWidget),' ',dbgs(event^.thein));
|
||||
DebugLn('GTKAPIWidgetClient_FocusIn ',DbgS(AWidget),' ',dbgs(event^.{$ifdef gtk1}thein{$else}_in{$endif}));
|
||||
{$ENDIF}
|
||||
|
||||
gtk_widget_set_flags(AWidget, GTK_HAS_FOCUS);
|
||||
@ -579,7 +579,7 @@ function GTKAPIWidgetClient_FocusOut(AWidget: PGTKWidget;
|
||||
Event: PGdkEventFocus): GTKEventResult; cdecl;
|
||||
begin
|
||||
{$IFDEF VerboseFocus}
|
||||
DebugLn('GTKAPIWidgetClient_FocusOut ',DbgS(AWidget),' ',dbgs(event^.thein));
|
||||
DebugLn('GTKAPIWidgetClient_FocusOut ',DbgS(AWidget),' ',dbgs(event^.{$ifdef gtk1}thein{$else}_in{$endif}));
|
||||
{$ENDIF}
|
||||
|
||||
gtk_widget_unset_flags(AWidget, GTK_HAS_FOCUS);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user