View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0019283||Lazarus||LCL||public||2011-05-04 08:13||2021-04-21 21:56|
|Reporter||Andrey Zubarev||Assigned To|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Product Version||0.9.31 (SVN)|
|Summary||0019283: Cursor:=crNone and modal forms|
|Description||divide issue 0018874 in the second part of the issue it has not received attention|
If the main window set Cursor:=crNone and draw the cursor itself, then during the show Application.messagebox or OtherForm.showmodal cursor is not displayed on main window. In win32 it works fine, the cursor appears
|Tags||No tags attached.|
|Fixed in Revision|
Could you please add a test project demonstrating the problem.
project1.lpr.zip (129,052 bytes)
||Example added. After pressing button1 the cursor is visible only over the button and over the messagebox|
Yes but Form1.Cursor is set to crNone intentionally.
You could make it visible like this:
procedure TForm1.Button1Click(Sender: TObject);
application.MessageBox('please, click on main form','test',MB_YESNO);
I tested with both GTK2 and QT.
GTK2 has problems with z-order as mentioned in the related issue. It works with QT.
QT doesn't show cursor even on the button which should have crDefault cursor. That works with GTK2.
QT's canvas does not work. Is it a known issue?
>>You could make it visible like this:
I know it and so do. But I think it's better to do it within the LCL, to organize behavior as win. Not every piece of program (which shows the modal window) is aware of all the windows without the cursor (there may be many).
>>QT's canvas des not work. Is it a known issue?
No, I'm using only GTK2 and Windows. instead of canvas using TOpenGLControl, which so far does not support the QT((
||I would like to close this as "won't fix". This is how X11 operates .. so it's bit different from win. I don't have idea how to fix this inside LCL, maybe BUT maybe this can be fixed in widgetset code when calling such dialogs (promptUser,AskUser etc), but what about modal forms etc etc ?|
||@Andrey, can you retest against r34635 ? Cursor handling is changed under gtk2 ...and now gtk2 and qt shows same behaviour with your example.|
No, left the old behavior. The cursor is not visible in qt and gtk2((
KDE 4.7.97 (4.8 RC2 (4.7.97)
Lazarus 0.9.31 r34635 FPC 2.7.1 x86_64-linux-gtk 2
@Andrey, no I cannot back to old behaviour because now it's correct and fixes few issues under gtk2. There's another problem with cursor under qt and gtk2 - seem that parent widget doesn't allow setting cursor for child when it's cursor is crNone (like it is now , so button cursor is crNone always).
Update: what should be correct ? Cursor visible over button but not over form ?
Correctly - when the cursor is displayed during the show a modal window IMHO. In this example, before clicking the cursor on the form is not shown. after pressing the button should shown on the form.
>>no I cannot back
I'm not asking to return, only saying he did not notice the changes. Sorry for my english
||@Andrey but I see cursor over that modal dialog in gtk2 and qt ? There's only no cursor over button on main form (and I think there should be cursor if button.Cursor <> crNone .. but it isn't).|
Yes, Cursor: = crNone made myself, and it seems logical that he would not see. But that kind of logic at the time of the show a modal window is nothing but difficulties of positioning does not. It turns any piece of program to show the message (or any modal window) needs to know where the cursor is turned off and turn it on.
It turns out instead:
I have to do:
uses ....mainform,....;//big trouble that wants to avoid
Could you please retest with r43447?
It shows/restores screen cursor before/after each ShowModal.
Test on Lazarus 1.3 r42923:44973M FPC 2.7.1 x86_64-linux-qt (qt>k2)
Cursor with ShowModal or Application.MessageBox not shown((
||Please resolve this as no change required|
|2011-05-04 08:13||Andrey Zubarev||New Issue|
|2011-05-04 08:13||Andrey Zubarev||Widgetset||=> GTK 2|
|2011-05-06 10:24||Juha Manninen||LazTarget||=> -|
|2011-05-06 10:24||Juha Manninen||Note Added: 0048078|
|2011-05-06 10:24||Juha Manninen||Status||new => feedback|
|2011-05-07 07:20||Andrey Zubarev||File Added: project1.lpr.zip|
|2011-05-07 07:26||Andrey Zubarev||Note Added: 0048102|
|2011-05-07 09:50||Juha Manninen||Relationship added||child of 0018874|
|2011-05-07 10:24||Juha Manninen||Note Added: 0048103|
|2011-05-07 10:28||Juha Manninen||Note Edited: 0048103|
|2011-05-07 10:46||Andrey Zubarev||Note Added: 0048105|
|2011-05-07 10:47||Andrey Zubarev||Note Edited: 0048105|
|2011-05-07 10:57||Andrey Zubarev||Note Edited: 0048105|
|2011-12-06 18:32||Zeljan Rikalo||Note Added: 0054749|
|2011-12-06 18:32||Zeljan Rikalo||Status||feedback => acknowledged|
|2012-01-07 11:41||Zeljan Rikalo||Note Added: 0055542|
|2012-01-07 11:41||Zeljan Rikalo||Status||acknowledged => feedback|
|2012-01-07 12:20||Andrey Zubarev||Note Added: 0055547|
|2012-01-07 15:24||Zeljan Rikalo||Note Added: 0055550|
|2012-01-07 15:25||Zeljan Rikalo||Note Edited: 0055550|
|2012-01-07 21:32||Andrey Zubarev||Note Added: 0055564|
|2012-01-07 22:00||Zeljan Rikalo||Note Added: 0055567|
|2012-01-09 09:04||Andrey Zubarev||Note Added: 0055607|
|2012-02-04 11:08||Zeljan Rikalo||LazTarget||- => 1.2|
|2012-03-15 13:13||Vincent Snijders||Status||feedback => acknowledged|
|2014-01-14 15:16||Martin Friebe||LazTarget||1.2 => 1.4|
|2014-05-01 14:27||Bart Broersma||Note Added: 0074710|
|2014-05-01 14:27||Bart Broersma||Status||acknowledged => feedback|
|2014-05-08 17:53||Andrey Zubarev||Note Added: 0074855|
|2014-05-08 17:53||Andrey Zubarev||Status||feedback => new|
|2015-04-27 21:59||Juha Manninen||LazTarget||1.4 => -|
|2021-04-21 21:56||Andrey Zubarev||Note Added: 0130503|