mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 12:29:29 +02:00
LCL-GTK3: Implement ApplicationProperties.OnActivate/OnDeactivate. Issue #37867, patch from Anton Kavalenka.
git-svn-id: trunk@63957 -
This commit is contained in:
parent
ab4eeb5ffc
commit
935b33a771
@ -1055,6 +1055,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
const act_count:integer=0;
|
||||
|
||||
function Gtk3WidgetEvent(widget: PGtkWidget; event: PGdkEvent; data: GPointer): gboolean; cdecl;
|
||||
begin
|
||||
{$IFDEF GTK3DEBUGCOMBOBOX}
|
||||
@ -1230,6 +1232,19 @@ begin
|
||||
end;
|
||||
GDK_FOCUS_CHANGE:
|
||||
begin
|
||||
if event^.focus_change.in_=1 then
|
||||
begin
|
||||
if act_count=0 then
|
||||
Application.IntfAppActivate();
|
||||
inc(act_count);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if act_count>0 then
|
||||
Application.IntfAppDeactivate();
|
||||
dec(act_count);
|
||||
end;
|
||||
|
||||
if wtComboBox in TGtk3Widget(Data).WidgetType then
|
||||
begin
|
||||
TGtk3ComboBox(Data).DumpPrivateStructValues('GDK_FOCUS_CHANGE='+IntToStr(Event^.focus_change.in_));
|
||||
|
Loading…
Reference in New Issue
Block a user