Bug 360234 - Cursor not in focus while Yakuake it is
Summary: Cursor not in focus while Yakuake it is
Status: RESOLVED WORKSFORME
Alias: None
Product: yakuake
Classification: Applications
Component: general (show other bugs)
Version: Git (KDE Platform 4)
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-07 23:59 UTC by Leonardo Romor
Modified: 2020-12-21 04:34 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Bug video (489.17 KB, video/mp4)
2016-03-09 00:43 UTC, Leonardo Romor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Romor 2016-03-07 23:59:33 UTC
When I open/close the terminal, if the mouse was over the Yukuake terminal, the cursor lose the focus.
It becomes a bit frustrating for instance when you want to copy a string in the terminal it prints "^V".

I tried to debug it myself, it seems there's a problem with the hide() method inherited from qwidget. Inside void MainWindow::kwinAssistToggleWindowState(bool visible)
 ...
...
if (visible)
        {
            sharedPreHideWindow();

            hide();


that last hide() method call seems to be the problem. Commenting it is a dirty fix in order to solve the issue
Comment 1 Eike Hein 2016-03-08 08:07:55 UTC
I think this is actually a redraw issue in the Konsole terminal widget. If you move the mouse pointer across the broken cursor you will see it gets filled in. Focus is fine, it's just a display issue here. Can you confirm?

(And that hide() call is necessary to, well, hide the window.)
Comment 2 Leonardo Romor 2016-03-09 00:43:56 UTC
Created attachment 97779 [details]
Bug video
Comment 3 Leonardo Romor 2016-03-09 00:46:49 UTC
"If you move the mouse pointer across the broken cursor you will see it gets filled in. "
Well, for me doesn't work =(
As you can see the cursor "wrongly" toogle only when I place the mouse over the window of yakuake otherwise it works just fine. Also, is not only a "view" issue, since I can't copy paste with ctrl+shift+c/v until I click outside the window and then inside again.
Comment 4 Anton Novosyolov 2016-03-10 08:25:57 UTC
Experiencing the same problem.
Everything works, but cursor isn't filled and copying-pasting doesn't work.
When I close/open it many times, problem is on/off randomly, I tried pauses between attempts, completely releasing all keys (I use Alt-~ hotkey), etc.
Comment 5 tailings 2016-03-13 04:24:47 UTC
Exactly same problem here.
Comment 6 Walter Rudametkin 2016-03-14 22:08:45 UTC
Same problem here. If mouse is above Yakuake when it appears focus is wrong and copy/paste shortcuts don't work.

If the display animation is set around 130ms the problem goes away. That is, the terminal appears with a slow animation speed, the cursor block shows as if it is not focused, but the shortcuts continue work and the terminal is properly focused. If I speed up the animation, to around ~90ms, it's hit and miss. At 0ms (my prefered speed), copy/paste never works right.

It looks like there are a couple of focus bugs that appeared recently. Maybe they are all related ?
https://bugs.kde.org/show_bug.cgi?id=356853

Regards,
Comment 7 Eike Hein 2016-03-15 07:58:17 UTC
^ Yes, probably related. Don't worry, I have all of the tickets on my mind. I currently have to focus on other things for work, but I'm investigating and hoping to bring you a 3.0.3 soon. That said, if anyone /else/ wants to investigate, too, please do because I'm very very busy.
Comment 8 Leonardo Romor 2016-03-16 02:02:42 UTC
I need your help, as I already said I'm new to qt, the last thing I understood was the following
if I use the legacy xshapeToggleWindowState() everything works indeed substituting
inside kwinAssistToggleWindowState(bool visible):

        if (visible)
        {
            sharedPreHideWindow();

            m_animationFrame = Settings::frames();

            connect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(xshapeRetractWindow()));
            m_animationTimer.start();

            // sharedPreHideWindow();
            //
            // hide();
            //
            // sharedAfterHideWindow();
        }

solve the issue. 

Slowing down the animation with 
data[2] = Settings::frames() * 100;
data[3] = Settings::frames() * 100;
I can see that using the legacy animation the cursor always blink when using the shortcut to open the terminal. Using the X11 solution instead sometimes change the cursor state to "unfocused".
Comment 9 Alexander 2016-07-17 18:48:29 UTC
I investigated this issue. Likely, the bug is in Qt. I filled it in the bugtracker:
https://bugreports.qt.io/browse/QTBUG-49071

Also I sent a patch, which has been accepted:
https://codereview.qt-project.org/#/c/144899/

This should be fixed in Qt 5.6.1. Please, verify it with that version.

Best,
Alexander Bersenev
Comment 10 Justin Zobel 2020-11-21 11:17:19 UTC
Can any of the affected users please test and confirm that it was indeed fixed in a Qt update?

I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 11 Bug Janitor Service 2020-12-06 04:34:01 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2020-12-21 04:34:48 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!