View Issue Details

IDProjectCategoryView StatusLast Update
0011700LazarusLCLpublic2013-09-03 12:07
ReporterMartin Friebe Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.25 (SVN) 
Target Version0.9.28Fixed in Version0.9.27 (SVN) 
Summary0011700: delayed execution of SetCursor => e.g. Synedit MouseLinks
DescriptionOnly tested under windows.

If A visual component (like SynEdit) calls SetCursor the change is delayed until the cursor moves.

How to repeat:

- In Synedit position the cursor over a word.
- press CTRL (do NOT move the mouse)
  => The word is now highlighted as MouseLink
  => the cursor has not changed
- Move the mouse by a few pixel (keeping it over the same word)
  => The cursor now shows the Hand Symbol
- Release the CTRL key (do NOT move the mouse)
  => The word is no longer highlighted
  => The mouse is still the hand symbol
- move the mouse
  => cursor returns to normal
Additional InformationThis is because SetCursor does only set the internal cursor. The call to windows API is only made on receival of WM_SETCURSOR (which is on mouse movement)

in lcl\interfaces\win32\win32wscontrols.pp line 485

class procedure TWin32WSWinControl.SetCursor(const AWinControl: TWinControl;
  const ACursor: HCursor);
begin
  // in win32 controls have no cursor property. they can change their cursor
  // by listening WM_SETCURSOR and adjusting global cursor
  if csDesigning in AWinControl.ComponentState then
    Windows.SetCursor(ACursor);
end;


During runtime csDesign is NOT in componetState.

Maybe there should be a trigger of a WM_SETCURSOR message if it is not in csDesign?


TagsNo tags attached.
Fixed in Revision
LazTarget1.4
WidgetsetWin32/Win64
Attached Files

Activities

Martin Friebe

2009-11-13 04:13

manager   ~0032100

resolved sometime back

Issue History

Date Modified Username Field Change
2008-07-19 12:59 Martin Friebe New Issue
2008-07-19 12:59 Martin Friebe LazTarget => -
2008-07-19 12:59 Martin Friebe Widgetset => Win32
2008-07-19 13:39 Vincent Snijders LazTarget - => post 1.2
2008-07-19 13:39 Vincent Snijders Status new => acknowledged
2009-11-13 04:13 Martin Friebe Status acknowledged => resolved
2009-11-13 04:13 Martin Friebe Fixed in Version => 0.9.27 (SVN)
2009-11-13 04:13 Martin Friebe Resolution open => fixed
2009-11-13 04:13 Martin Friebe Assigned To => Martin Friebe
2009-11-13 04:13 Martin Friebe Note Added: 0032100
2009-11-13 04:13 Martin Friebe Target Version => 0.9.28
2011-12-01 11:22 Marc Weustink Status resolved => closed
2013-09-03 12:07 Martin Friebe LazTarget post 1.2 => 1.4