Re: [Lazarus] BUG: Gtk MouseExit, MouseUp

2015-04-08 Thread zeljko

On 04/08/2015 01:14 AM, Vojtěch Čihák wrote:

Yes, already reported by me, 3 years ago :-)

http://bugs.freepascal.org/view.php?id=21982


Works ok with gtk3 ;)

zeljko


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] BUG: Gtk MouseExit, MouseUp

2015-04-08 Thread zeljko

On 04/08/2015 01:14 AM, Vojtěch Čihák wrote:

Yes, already reported by me, 3 years ago :-)

http://bugs.freepascal.org/view.php?id=21982


I've attached possible fix.

zeljko


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] BUG: Gtk MouseExit, MouseUp

2015-04-07 Thread Anthony Walter
I can't believe this bug hasn't been reported,so I think I'll ask before
submitting a mantis report.

On Linux Gtk2 with TGraphicControl derived classes there seems to be a
problem with reliable MouseExit and MouseUp firing.

I had to write some work arounds which are still unreliable, but here's the
basic gist of the problem.

With TGraphicControl derived classes on Gtk2 sometimes MouseExit or MouseUp
do not fire.

If you mouse the mouse over a graphic control, press the left mouse button,
mouse out of the control and release the left button, the OnMouseUp event
is not invoked nor is the virtual MouseUp method.

Example:

procedure TForm1.Shape1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Tag := Tag + 1;
  Caption := IntToStr(Tag);
end;

With a TShape the MouseUp will only fire if the mouse is released while
over the control. On Windows and Macintosh this is not the standard
behavior. MouseCapture has no effect in fixing this problem. Curiously
TSpeedButton seems to have some special logic that gets around the problem
on Gtk2 which I've copied to my TGraphicControls but the problem still
exists with other graphic controls.

And then there is the MouseExit problem. It's not reliably being fired on
Gtk2 graphic controls. If you have 2 graphic controls close together or you
mouse the mouse too fast between controls one of them occasionally doesn't
receive the MouseExit. This causes issues with graphic controls which might
display different states based on whether the mouse is in them or out of
them.

Have these issues been reported before? They seem to be quite obvious and
I'm struggling to find that these problems haven't been reported or
discussed before.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] BUG: Gtk MouseExit, MouseUp

2015-04-07 Thread Anthony Walter
Disregard the MouseExit issue, I had an error in my test logic. The MouseUp
issue remains.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] BUG: Gtk MouseExit, MouseUp

2015-04-07 Thread Vojtěch Čihák

Yes, already reported by me, 3 years ago :-)
 
http://bugs.freepascal.org/view.php?id=21982
 
V.
 
__

Od: Anthony Walter sys...@gmail.com
Komu: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Datum: 07.04.2015 23:16
Předmět: [Lazarus] BUG: Gtk MouseExit, MouseUp


I can't believe this bug hasn't been reported,so I think I'll ask before 
submitting a mantis report.On Linux Gtk2 with TGraphicControl derived classes 
there seems to be a problem with reliable MouseExit and MouseUp firing.I had to 
write some work arounds which are still unreliable, but here's the basic gist 
of the problem.With TGraphicControl derived classes on Gtk2 sometimes MouseExit 
or MouseUp do not fire. If you mouse the mouse over a graphic control, press 
the left mouse button, mouse out of the control and release the left button, 
the OnMouseUp event is not invoked nor is the virtual MouseUp 
method.Example:procedure TForm1.Shape1MouseUp(Sender: TObject; Button: 
TMouseButton;  Shift: TShiftState; X, Y: Integer);begin  Tag := Tag + 1;  
Caption := IntToStr(Tag);end;  With a TShape the MouseUp will only fire if the 
mouse is released while over the control. On Windows and Macintosh this is not 
the standard behavior. MouseCapture has no effect in fixing this problem. Cur
iously TSpeedButton seems to have some special logic that gets around the 
problem on Gtk2 which I've copied to my TGraphicControls but the problem still 
exists with other graphic controls.And then there is the MouseExit problem. 
It's not reliably being fired on Gtk2 graphic controls. If you have 2 graphic 
controls close together or you mouse the mouse too fast between controls one of 
them occasionally doesn't receive the MouseExit. This causes issues with 
graphic controls which might display different states based on whether the 
mouse is in them or out of them.Have these issues been reported before? They 
seem to be quite obvious and I'm struggling to find that these problems haven't 
been reported or discussed before.

--

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus