Created attachment 55340 [details]
Use this document to easily reproduce.
The modeless Word Count window is a (major) new feature for LibO 3.5, however, it makes some trouble when using notes/comments.
To reproduce, simply download the document and follow the steps or:
1. write something
2. add a comment (Ctrl-Alt-C), write something into it
3. click back into the document
4. click Tools > Word Count
5. click into the comment
Result: word count window vanishes; clicking into the document again makes it reappear.
Expected: word count window should not hide.
Additionally, see that Word Count seems to count every comment as a one-character word. (Should I open a new bug for this?)
(Christoph Noack reported this first in UX-advise; sorry about the empty first comment.)
Confirmed for me on Linux. Reading the wordcount patch I suspect it may be some re-use of the:
void ViewShell::SetCareWin( Window* pNew )
use / concept - at least Notes uses that too; as does the red-line merge/accept changes dialog, as does the insert footnote dialog etc. Quite why Notes would want to do that, I don't know. Sadly the commenting:
sw/inc/viewsh.hxx: static Window* pCareWindow; // Avoid this window.
is not so lucid; needs a bit of code reading to try to work out what is going on. I suppose the idea is to have only one window that you need to 'care' about up at once ;-)
Adding some developers that might be interested into this bug. Both Kendy and Cedric worked on the notes handling.
Reported the second bug from comment 1 as bug 50780 – Word Count counts comments
Created attachment 63423 [details]
Muhammad Haggag committed a patch related to this issue.
It has been pushed to "master":
fdo#44602 Modeless word count window hides when user clicks into a note
Thank you very much for this and your other fixes around word count, Muhammad!
(Closing as fixed.)