Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-12

GTK2: Changing cursor messes with mousecapture.

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Torsten Bonde Christiansen

Hi List.

If a control has captured the mouse and eg. during a mouse move, changes the cursor, this
capture is lost. The has an unwanted sideeffect of eg. MouseUp events are not fired if the
mouse is released outside the control.

This is only the case in the GTK2 widgetset, but not with Win32 nor Carbon.

Is this by design or a bug i should report to the bugtracker?

I think that the very least all widgetsets should behave the same.

Tested on Lazarus trunk r.47199, Lazarus 1.2.6 - both with fpc 2.6.4.

Regards,
Torsten.

======================

Sample code:

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
   Shift: TShiftState; X, Y: Integer);
begin
   Screen.Cursor := crNoDrop;
end;
procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
   Shift: TShiftState; X, Y: Integer);
begin
   Screen.Cursor := crDefault;      //  <= on GTK2: No event happens if
mouse is release outside the form
end;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141215/d49ede50/attachment.html>

Reply by email