Menu

#1486 Invalidate CallTip window before show when it's already created

Committed
closed
5
2023-07-26
2023-06-02
Zufu Liu
No

When CallTip window is already created, ScintillaBase::CallTipShow() will only move it without drawing new content when new size is same as previous. added InvalidateRect() to ScintillaWin::CreateCallTipWindow() request redraw.

+   } else {
+       ::InvalidateRect(HwndFromWindow(ct.wCallTip), nullptr, FALSE);

Discussion

  • Neil Hodgson

    Neil Hodgson - 2023-06-02
            ct.wCallTip.InvalidateAll();
    
     
    • Zufu Liu

      Zufu Liu - 2023-06-02

      Yeah, that's where my code come from.
      maybe InvalidateAll() need to be placed in ScintillaBase::CallTipShow() as ScintillaQt::CreateCallTipWindow() or other platforms may have same problem.

       
  • Neil Hodgson

    Neil Hodgson - 2023-06-04
    • Group: Initial --> Committed
     
  • Neil Hodgson

    Neil Hodgson - 2023-06-04

    Committed with [0f2095].

     

    Related

    Commit: [0f2095]

  • Zufu Liu

    Zufu Liu - 2023-06-05

    I was thought add ct.wCallTip.InvalidateAll(); before ct.wCallTip.Show(); to avoid immediate redraw after show.

     
    • Neil Hodgson

      Neil Hodgson - 2023-06-05

      I don't think that the draw will happen until returning to the message loop. Here is a trace switching from "20 " to "39 " in monospaced text:

      PaintContents "20 " draw=true
      CallTipShow {x=57.060743331909180 y=32.000000000000000 } 0x0000020bf936c508 "39 "
      PaintContents "39 " draw=false
      SetPositionRelative
      Show
      Invalidate
      PaintCT
      PaintContents "39 " draw=true
      
       
      👍
      1
      • Zufu Liu

        Zufu Liu - 2023-06-05

        OK, got it.

         
  • Neil Hodgson

    Neil Hodgson - 2023-07-26
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.