Lazarus

Programming => Operating Systems => Linux => Topic started by: Ocye on May 02, 2012, 10:35:13 am

Title: Default cursor for control doesn't work
Post by: Ocye on May 02, 2012, 10:35:13 am
I have a panel with a small side area of 3px where the cursor is changed to crSizeNW/SW etc. (it's a resizeable panel). On the panel is a control, ie. listbox or glcontext. The embedded control has crDefault property. When I move the cursor with the right speed it isn't changed to default pointer sometimes. I tried with OnMouseLeave code for the panel but that didn't help. When I replace the cursor of the embedded control with something else like crCross it runs perfectly. What can I do?
The problem does not occur under Windows.
Title: Re: Default cursor for control doesn't work
Post by: zeljko on May 02, 2012, 12:16:56 pm
Qt or gtk2 ?
Title: Re: Default cursor for control doesn't work
Post by: Ocye on May 02, 2012, 01:01:50 pm
Gtk2. I'll check Qt this evening.
Title: Re: Default cursor for control doesn't work
Post by: Ocye on May 02, 2012, 07:08:22 pm
No problem with Qt. Openglcontext not tested since it isn't supported.

PS: I put some controls together and it is an issue with Qt too. To reproduce place a panel on a form and change cursor to crHourGlass. Add a listview to the panel and make it alClient. The cursor will change when moving over the bevel but stays an hourglass at the listview which cursor property is crDefault.

PPS: Arch Linux, KDE 4.8.2
Title: Re: Default cursor for control doesn't work
Post by: zeljko on May 03, 2012, 07:43:07 am
That's because qt changes cursor for parent (TPanel) and then to all of it's children all the time.
Title: Re: Default cursor for control doesn't work
Post by: Ocye on May 03, 2012, 01:05:07 pm
Is it good to link cursor to parent? I don't think so but I should blame Qt for that. Or XOrg?

The question remains: How do I use the proper default cursor for embedded controls?
TinyPortal © 2005-2018