Recent

Author Topic: Problem with dragging a TDragObject on Linux  (Read 1756 times)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Problem with dragging a TDragObject on Linux
« on: May 15, 2020, 07:40:11 am »
hello,
 coming with Lazarus there is an example to use a TDragObject :   Lazarus/examples/dragImageList
with this example you drag a button and drop it on a target.
When i use original source code, no problem , the TDragObject moves with cursor (See DragImageList1.gif)
Now, i want to put the cursor on the center of the dragObject. To do this i use this code :
Code: Pascal  [Select][+][-]
  1.   FDragImages.DragHotspot := Point(Bitmap.Width div 2, Bitmap.Height div 2);
  2.  
The problem is that the TDragObject moves only when the cursor goes out of it (See DragImageList2.gif)
Another problem, you can't drop the Tdragobject.
There is no such problem on Windows.
So what is wrong ?   

Friendly J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Problem with dragging a TDragObject on Linux
« Reply #1 on: May 15, 2020, 10:52:39 pm »
hello,
nobody to answer me  :'(
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Problem with dragging a TDragObject on Linux
« Reply #2 on: May 15, 2020, 11:04:15 pm »
Clearly the way TDragObject is implemented for the gtk widgetset is buggy.
I think report it on mantis as a platform-specific issue. Perhaps QT and carbon/cocoa are OK?

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Problem with dragging a TDragObject on Linux
« Reply #3 on: May 15, 2020, 11:09:13 pm »
ok,
thanks , i will try
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Problem with dragging a TDragObject on Linux
« Reply #4 on: May 15, 2020, 11:11:40 pm »
Hi!

Just tested on Linux with no problems:

fpc 3.04 Laz 2.08 gtk2 Linux64

Winni

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Problem with dragging a TDragObject on Linux
« Reply #5 on: May 15, 2020, 11:16:21 pm »
winni what is your linux distrib ?
me :
Centos8 Lazarus 2.0.8 gtk2 widgetset  and
Ubuntu 16.03 LTS Lazarus 2.0.8 gtk2
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Problem with dragging a TDragObject on Linux
« Reply #6 on: May 15, 2020, 11:18:33 pm »
Hi!

Suse Tumbleweed, last rolling release with new kernel 1 hour ago.

Winni

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Problem with dragging a TDragObject on Linux
« Reply #7 on: May 15, 2020, 11:25:34 pm »
Ok  Winni ,
if the TDragObject works differently depending on linux distrib, that it's not stable 
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Problem with dragging a TDragObject on Linux
« Reply #8 on: May 15, 2020, 11:54:24 pm »
with Ubuntu 16.04 Lazarus 2.0.8  Qt  widgetSet  moving is OK but dropping not working

Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Problem with dragging a TDragObject on Linux
« Reply #9 on: May 16, 2020, 12:01:58 am »
Hi!

For me it works as you can see in the attachment.

Start the programm from the console and look if their are some error messages.

Winni

 

TinyPortal © 2005-2018