Bug 374065 - Device Notifier hijacks application focus
Summary: Device Notifier hijacks application focus
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Disks & Devices widget (other bugs)
Version First Reported In: 5.8.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-23 06:21 UTC by Daniel
Modified: 2016-12-23 15:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2016-12-23 06:21:04 UTC
The USB port on my phone (Nexus 5) is relatively loose, so just a tiny little jiggle will cause it to disconnect and reconnect to the computer.

Every single time, while I'm working, and this happens, the "Device Notifier" plasmoid pops up and completely causes the application I was using (Qt Creator) to lose focus and focuses instead on the plasmoid. It is especially annoying when I'm trying to type, as I have to dismiss / minimise the plasmoid and refocus back to whatever it is that I was doing.
Comment 1 Kishore Gopalakrishnan 2016-12-23 09:26:17 UTC
(In reply to Daniel from comment #0)
> The USB port on my phone (Nexus 5) is relatively loose, so just a tiny
> little jiggle will cause it to disconnect and reconnect to the computer.
> 
> Every single time, while I'm working, and this happens, the "Device
> Notifier" plasmoid pops up and completely causes the application I was using
> (Qt Creator) to lose focus and focuses instead on the plasmoid. It is
> especially annoying when I'm trying to type, as I have to dismiss / minimise
> the plasmoid and refocus back to whatever it is that I was doing.

You might want to uncheck the 'open popup when new device is plugged in' checkbox. Right click on the icon, click 'device notifier settings', then look in the 'General tab'.
Comment 2 Daniel 2016-12-23 09:32:32 UTC
(In reply to kishore96 from comment #1)

I like the popup, though (I utilise it, knowing when my device is connected or not, before I run some code). :-/ Is there a way to still receive the notification without it stealing focus?
Comment 3 Kishore Gopalakrishnan 2016-12-23 09:37:54 UTC
(In reply to Daniel from comment #2)
> (In reply to kishore96 from comment #1)
> 
> I like the popup, though (I utilise it, knowing when my device is connected
> or not, before I run some code). :-/ Is there a way to still receive the
> notification without it stealing focus?

Even if the popup is disabled, the device notifier icon changes for a few seconds when the device is plugged in. Not sure if there's a way to make it pop up without taking focus, though.
Comment 4 David Edmundson 2016-12-23 15:51:28 UTC
>Is there a way to still receive the notification without it stealing focus?

There is not.

Working round a broken cable is already quite a niche situation, and we have an option for having a popup or not. I don't want to add a third possibility for open but don't take focus.
Also note in 5.9 onwards you can just hit esscape to dismiss the popup which will make life easier.

You can also achieve it locally by keeping the popup and the configuring a kwin rule to prevent it taking the focus.