View Issue Details

IDProjectCategoryView StatusLast Update
0038842LazarusWidgetsetpublic2021-05-09 16:20
ReporterCudaText man Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
OSUbuntu 20.4 
Product Version2.1 (SVN) 
Summary0038842: gtk3: 'Tooltip' form doesn't appear
DescriptionThis demo gives a memo and handles F2 key to show custom-made tooltip form.
it works on gtk2, qt5, win32 but not on gtk3.
gtk3: form just don't appear on F2.
TagsNo tags attached.
Fixed in Revisionr65091
LazTarget-
WidgetsetGTK 3
Attached Files

Activities

CudaText man

2021-05-02 15:28

reporter  

tst-tooltip-focus.zip (4,829 bytes)

Anton Kavalenka

2021-05-03 13:17

reporter   ~0130736

F1 .. F30 handled now
gtk3procs.diff (536 bytes)   
Index: lcl/interfaces/gtk3/gtk3procs.pas
===================================================================
--- lcl/interfaces/gtk3/gtk3procs.pas	(revision 65083)
+++ lcl/interfaces/gtk3/gtk3procs.pas	(working copy)
@@ -655,6 +655,8 @@
     GDK_KEY_Tab, GDK_KEY_3270_BackTab, GDK_KEY_ISO_Left_Tab: Result := VK_TAB;
     GDK_KEY_Shift_L, GDK_KEY_Shift_R: Result := VK_SHIFT;
     GDK_KEY_Control_L, GDK_KEY_Control_R: Result := VK_CONTROL;
+    GDK_KEY_F1 .. GDK_KEY_F30:
+      Result:= VK_F1 + (AValue - GDK_KEY_F1);
   end;
 end;
 
gtk3procs.diff (536 bytes)   

CudaText man

2021-05-03 13:55

reporter   ~0130737

Last edited: 2021-05-03 13:56

View 2 revisions

good. But it has a bug. first F2 presses show the tooltip, but next presses - show AND HIDE the tooltip (shows- very small pause- hides).

Anton Kavalenka

2021-05-03 16:03

reporter   ~0130741

Last edited: 2021-05-03 16:06

View 2 revisions

It is your bug. Stop the timer after tooltip hidden.

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  f2.Hide;
  Timer1.Enabled:= false;
  writeln(format('passed %d ms',[sysutils.GetTickCount64-t1]));
end;

CudaText man

2021-05-04 17:29

reporter   ~0130755

Let's apply the patch then. (I can test again after few days, if you see it's fixed, then apply it).

Juha Manninen

2021-05-07 11:07

developer   ~0130782

Applied, thanks.

CudaText man

2021-05-09 16:19

reporter   ~0130807

Last edited: 2021-05-09 16:20

View 3 revisions

I found issue in the same demo.
tooltip now appears, ok.
but,

1) tooltip show-time is much smaller than it should be (2sec), it is like 0.6...1.0 seconds. You can compare it by changing the build-mode to gtk2/qt5.
2) during tooltip show, main form looses focus and I cannot move caret in the memo. it works OK in gtk2/qt5.

I have Ubuntu 20.04 with Gnome

Issue History

Date Modified Username Field Change
2021-05-02 15:28 CudaText man New Issue
2021-05-02 15:28 CudaText man File Added: tst-tooltip-focus.zip
2021-05-03 13:17 Anton Kavalenka Note Added: 0130736
2021-05-03 13:17 Anton Kavalenka File Added: gtk3procs.diff
2021-05-03 13:55 CudaText man Note Added: 0130737
2021-05-03 13:56 CudaText man Note Edited: 0130737 View Revisions
2021-05-03 16:03 Anton Kavalenka Note Added: 0130741
2021-05-03 16:06 Anton Kavalenka Note Edited: 0130741 View Revisions
2021-05-04 17:29 CudaText man Note Added: 0130755
2021-05-07 10:38 Juha Manninen Assigned To => Juha Manninen
2021-05-07 10:38 Juha Manninen Status new => assigned
2021-05-07 11:07 Juha Manninen Status assigned => resolved
2021-05-07 11:07 Juha Manninen Resolution open => fixed
2021-05-07 11:07 Juha Manninen Fixed in Revision => r65091
2021-05-07 11:07 Juha Manninen LazTarget => -
2021-05-07 11:07 Juha Manninen Widgetset GTK 3 => GTK 3
2021-05-07 11:07 Juha Manninen Note Added: 0130782
2021-05-07 13:35 CudaText man Status resolved => closed
2021-05-09 16:19 CudaText man Status closed => assigned
2021-05-09 16:19 CudaText man Resolution fixed => open
2021-05-09 16:19 CudaText man Note Added: 0130807
2021-05-09 16:20 CudaText man Note Edited: 0130807 View Revisions
2021-05-09 16:20 CudaText man Note Edited: 0130807 View Revisions