Bug 348905 - Connect/Disconnect button sometimes disappears when trying to click it
Summary: Connect/Disconnect button sometimes disappears when trying to click it
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: applet (show other bugs)
Version: 5.3.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
: 351781 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-08 23:04 UTC by Alexander Potashev
Modified: 2015-09-23 21:08 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2015-06-08 23:04:44 UTC
See "steps to reproduce" below.

Reproducible: Always

Steps to Reproduce:
1. open Plasma NM applet
2. connect to your access point by clicking Connect button (I have saved the password for my AP in NetworkManager configuration, so connection is established in a couple of seconds).
3. disconnect from it by clicking Disconnect button
4. hover another AP's Connect button
5. move the mouse pointer back to your AP's Connect button
6. click on the Connect button for your AP

Actual Results:  
The Connect button disappears and connection is not initiated.

Expected Results:  
NM should at least initiate connection to the AP when clicking on Connect.
Comment 1 robspamm 2015-06-09 19:12:40 UTC
I see the same behaviour and I am not sure why so few people report it. Archlinux:

plasma-desktop 5.3.1-2
plasma-framework 5.10.0-1
plasma-nm 5.3.1-1
plasma-workspace 5.3.1-1
Comment 2 Jan Grulich 2015-06-10 13:06:09 UTC
Does it happen without any notification which appears at that moment you want to click on the button? I'm not able to reproduce this problem, only when a notification appears the applet loses focus, but this is not our fault.
Comment 3 robspamm 2015-06-12 15:37:40 UTC
OK, its the fault of the notification that pops up. I never could have gotten those two together. Do you probably know the corresponding bug?
Comment 4 Jan Grulich 2015-06-17 07:51:59 UTC
None I know of, you would need to probably report it yourself.
Comment 5 Alexander Potashev 2015-06-17 20:59:16 UTC
On my computer this problem can also be explained by the notification "network interface disconnected": after a few seconds the notification hides, and then I can trigger the "Connect" button with one click.

I think it should be OK if we reassign this bug report to the relevant product/component. Can it be plasmashell?
Comment 6 Alexander Potashev 2015-06-20 19:13:33 UTC
Reassigned to plasmashell[notifications] because this is at least closer to where the bug can be fixed. Is it may be possible to prevent notifications from stealing focus from plasmoid pop-ups?
Comment 7 Martin Klapetek 2015-06-22 08:47:34 UTC
The notification popups have

    flags: Qt.WindowDoesNotAcceptFocus

so in theory, it should not be getting focus at all. Unless that flag is ignored somewhere in lower levels.

Also, perhaps NM shouldn't show notifications while the applet is opened? It's basically duplicating the same info that is already on the screen.
Comment 8 Alexander Potashev 2015-06-22 22:46:20 UTC
Qt::WindowDoesNotAcceptFocus is only for widgets inside a window/dialog. I guess a notification is implemented as a separate window, so it will get _activated_ anyway. I probably misused the term "focused" here.

I agree, we can make NM disable notifications when they tell nothing new to the user. Not sure though how to implement this without explicit interaction between the kded service (where notifications seem to go from) and the applet.
Comment 9 Alexander Potashev 2015-06-24 03:26:54 UTC
Marco,

Why plasma-nm[applet]? What are you suggesting to fix there? Yes, notification suspension should be done in plasma-nm, but this won't fix the problem completely, only workaround it in most cases. What if we get some other notification (not from NM) while the plasma-nm popup is active? I think it should be addressed somehow in plasmashell[notifications], e.g. make all notifications inactive windows.

Shall I create another wishlist report about notification suspension in plasma-nm?
Comment 10 Francois Prunier 2015-06-24 08:20:01 UTC
Hi,

I've got the same problem on Kubuntu 15.04 (backports enabled). It's really frustrating.

On my home PC, when i click disconnect, I have to close the popup that appears to be able to click connect again on the applet. On my work PC, at the moment I'm typing this, I cannot click on any connect or disconnect button and there is no popup to close, so I'm just stuck. Going through the connection editor works though but that's really just a workaround.

IMHO it should be a high priority bug, I'll vote for it :)
Comment 11 David Edmundson 2015-08-26 22:11:56 UTC
*** Bug 351781 has been marked as a duplicate of this bug. ***
Comment 12 Jan Grulich 2015-09-23 12:06:05 UTC
Git commit f1ae6f60769876e5f7ddc0c710f5dec9f862a6e6 by Jan Grulich.
Committed on 25/07/2015 at 11:33.
Pushed by grulich into branch 'master'.

Workaround for notifications stealing focus of the connect/disconnect button

REVIEW:124314

M  +7    -1    applet/contents/ui/ConnectionItem.qml
M  +7    -0    applet/contents/ui/PopupDialog.qml