View Issue Details

IDProjectCategoryView StatusLast Update
0037712LazarusWidgetsetpublic2020-10-24 20:49
ReporterCudaText man Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
OSUbuntu 20 x64 
Product Version2.1 (SVN) 
Summary0037712: gtk3: TApplication.ActivateHint refreshes hint on every mouse move
DescriptionRelated to https://bugs.freepascal.org/view.php?id=37599
to not mess all topics there.

demo:
https://github.com/Alexey-T/ATFlatControls/tree/master/app/demo_tabs
Tabs 2nd and 3rd have custom hint.
When I move mouse over tabs (tab 2 and 3) I expect that hint refreshes ONLY on move to new tab.
gtk3: hint refreshed+flickers on EVERY mouse move.

Set breakpoint in TApplication.ActivateHint.
It's called in mouse move.
on gtk3, it goes to

  HintControlChanged := not CheckHintControlChange or (FHintControl <> Info.Control);
  if Info.ControlHasHint then
  begin
    if HintControlChanged then
    begin
      StopHintTimer;
      HideHint;
      FHintControl := Info.Control;
      FHintRect := FHintControl.BoundsRect;
    end;                               


so gtk3 has HintControlChanged=true! its a bug!
on mouse move inside one tab, control is the same.
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 3
Attached Files

Relationships

related to 0037351 closedJuha Manninen [GTK3] Hint window does not work 
related to 0037599 new gtk3: Bugs in ATTabs 

Activities

CudaText man

2020-09-06 16:40

reporter   ~0125406

Guess that HintControlChanged=true
because of FHintControl=nil, which is cleared here

0 CANCELHINT(0x7ffff59e28f0) at include/application.inc:1294
1 NOTIFYUSERINPUTHANDLER(0x7ffff59e28f0, 0x7ffff59e2f30, 66636) at include/application.inc:1537
2 NOTIFYAPPLICATIONUSERINPUT(0x7ffff59e2f30, 66636) at forms.pp:1920
3 GTKEVENTMOUSEENTERLEAVE(0x7ffff59f5ad0, 0xc2c170, 0x17b3000) at gtk3/gtk3widgets.pas:1757
4 GTK3WIDGETEVENT(0xc2c170, 0x17b3000, 0x7ffff59f5ad0) at gtk3/gtk3widgets.pas:1262

Anton Kavalenka

2020-09-06 18:39

reporter   ~0125408

In win32 widgetset NotifyApplicationUserInput called only in special cases.
Where it is required in message handler set the boolean NotifyUserInput:=true

// application processing
  if NotifyUserInput then
  begin
    CurrentWindow := Window;
    NotifyApplicationUserInput(lWinControl, PLMsg^.Msg);
    // Invalidate associated lWinControl if current window has been destroyed
    if CurrentWindow = 0 then
      lWinControl := nil;
  end;

In GTK3 NotifyApplicationUserInput is called in every event handler without any filters

CudaText man

2020-09-07 09:54

reporter   ~0125414

So we must improve this handler?

CudaText man_

2020-09-07 19:16

reporter   ~0125431

found that maybe the reason is hiding the hint by Application.HintTimer (it gives HintControlChanged=True)

    // start hide timer
    if HintInfo.ReshowTimeout>0 then
      StartHintTimer(HintInfo.ReshowTimeout,ahttReshowHint)
    else
      StartHintTimer(HintInfo.HideTimeout,ahttHideHint); /////this is called often on gtk3

CudaText man_

2020-09-08 10:34

reporter   ~0125435

NEW SMALL DEMO
https://github.com/Alexey-T/FreePascal-tests/tree/master/Hints%20for%20n%20cells

Juha Manninen

2020-10-24 14:34

developer   ~0126510

Please test with r64067. See related 0037351.

CudaText man

2020-10-24 20:49

reporter   ~0126521

Testing of ATFlatControls tabs-demo shows that for first seconds of usage, its better, but after N seconds and moving of mouse around tabs (2nd-3rd tabs, X icons), it's same bad

Issue History

Date Modified Username Field Change
2020-09-06 16:12 CudaText man New Issue
2020-09-06 16:40 CudaText man Note Added: 0125406
2020-09-06 18:39 Anton Kavalenka Note Added: 0125408
2020-09-07 08:55 Juha Manninen Relationship added related to 0037351
2020-09-07 09:54 CudaText man Note Added: 0125414
2020-09-07 19:16 CudaText man_ Note Added: 0125431
2020-09-08 10:34 CudaText man_ Note Added: 0125435
2020-09-20 08:56 Juha Manninen Relationship added related to 0037599
2020-10-24 14:34 Juha Manninen Note Added: 0126510
2020-10-24 20:49 CudaText man Note Added: 0126521