Bug 502116 - Plasma popups never stay passive - they always get focus
Plasma popups never stay passive - they always get focus
Product: Fedora
Classification: Fedora
Component: kdelibs (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-05-21 18:56 EDT by Björn Ruberg
Modified: 2009-05-31 08:29 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-31 08:29:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Björn Ruberg 2009-05-21 18:56:10 EDT
Description of problem:
PopupApplets (widgets that open when you click on an icon in the panel) are not passive although they should be. That means they steal the focus from the latest opened window when openend. They should NOT do that when a method setPassivePopup(true) is called on them. That's true for the calendar applet for example.
This may sound as a minor problem. BUT I have developed a virtual keyboard for plasma. And as it always gets focus when opened, it does not work anymore because all key events it produces are send to itself.

I experience this problem sind I upgraded from Fedora 10 to Fedora 11.

Version-Release number of selected component (if applicable):
4.2.2 and 4.2.3, but just in Fedora 11!

How reproducible:

Steps to Reproduce:
1. Click on you calendar applet in the panel
Actual results:
The latest window you have worked on looses the focus. The plasma widget gets it. Keys you type are shown nowhere on the screen.

Expected results:
The window should maintain the focus. If you type something and you have activated some text field, you will see the keystrokes in it.

Additional info:
This little app cannot work because of that bug:

I have no idea what is wrong in the fedora 11 builds of KDE. I might talk back to the KDE developers.
Comment 1 Kevin Kofler 2009-05-21 19:01:14 EDT
Looks like an issue with Qt 4.5.0. Can you please try 4.5.1 from updates-testing?
Comment 2 Björn Ruberg 2009-05-21 19:32:46 EDT
Tried. Does not help. I upgraded to Fedora 11 on 28th April. Before that it worked on my Fedora 10 install. I believe there was already qt-4.5 running on F10 at that time.
Comment 3 Kevin Kofler 2009-05-21 19:45:18 EDT
Qt 4.5.0 got pushed to stable on April 22.
Comment 4 Björn Ruberg 2009-05-22 16:18:46 EDT
Then it is definetly no Qt-4.5 problem. Have qt-4.5 running on Kubuntu 9.04, too. The bug is not there.
Comment 5 Kevin Kofler 2009-05-22 16:21:58 EDT
Bug or incompatible change in some lower-level library? Or maybe in GCC (causing Qt or KDE to be miscompiled)?
Comment 6 Björn Ruberg 2009-05-22 17:00:47 EDT
Cannot know. Are there any patches for Qt or kdelibs/kdebase that are only in Fedora 11?
Comment 7 Rex Dieter 2009-05-22 19:29:09 EDT
No (nothing f11-specific).

Fwiw, I can't seem to reproduce this.  plasma notifications here don't steal focus for me.
Comment 8 Björn Ruberg 2009-05-23 03:18:30 EDT
I don't mean notifications! I mean PlasmaPopups. Click on the clock and a calendar comes up. That calendar is the popup. And it steals focus of the active window for me. On different users.
Comment 9 Rex Dieter 2009-05-23 08:35:52 EDT
Maybe I'm missing something, but that would match my expectations (you click on a widget, it gets focus).
Comment 10 Rex Dieter 2009-05-23 08:37:19 EDT
Anyway, have you contacted kde upstream (either via mailing list or bugzilla)?  If not, I'd suggest you do, to at least get a handle on what the expected behavior is.
Comment 11 Björn Ruberg 2009-05-23 13:22:48 EDT
The expected behaviour IS that the popup stays passive IF setPassivePopup() is called on the plasma applet. So the programmer can decide whether it steals focus or not. 
For my virtual touchscreen I need it to stay passive. It cannot work otherwise.
Comment 12 Rex Dieter 2009-05-23 13:32:20 EDT
Shrug, I'm still having difficulty reproducing this.

Test 1:
open konsole, start typing
unplug laptop to induce battery monitor popup "The power adapter has been unplugged"
continue typing in konsole, with no loss of focus

This disproves (for me anyway), the subject that "Plasma popups ... always get focus"

Can you perhaps provide an concrete example of a popup that is supposed to be passive, but isn't?
Comment 13 Rex Dieter 2009-05-23 13:33:41 EDT
OK, you provided "1. Click on you calendar applet in the panel", it's unclear to me whether this is suppose to be passive or not.  I'll go digging in the code.
Comment 14 Rex Dieter 2009-05-23 13:58:13 EDT
Asking in #fedora-kde, I found at least one other to confirm my findings, that the digital clock applet behaves the same on F-10, with kde-4.2.3 (and qt-4.5.0) too (ie, it steals focus).
Comment 15 Björn Ruberg 2009-05-23 14:20:37 EDT
I can only repeat that I don't mean notfications but popups. To be precise, I mean all plasmoids that inherit von PopupApplet-Class. See here:

There you find the function setPassivePopup. If that is called with parameter true, the popup should stay passive. The digital clock applet does use that function and should stay passive. But it does not. 

I now found a Fedora 10 install and yes, the problem is there too. Before the 28 April I nealry daily developed on a plasmoid that relies heavily on not stealing the focus. I would have noticed if the problem had been there on Fedora 10 before.
Comment 16 Kevin Kofler 2009-05-23 15:02:58 EDT
The digital clock applet also steals focus on F9 + stable updates:
Comment 17 Björn Ruberg 2009-05-23 16:53:07 EDT
I just see that the digital-clock is not meant to stay passive. Strange, it did earlier. However, there seems to be no applet in the normal packages that uses the "stay passive"-feature. Just my own plasmoid.

I'm still sure that there is a problem but I will talk back with upstream now. As this feature is not used often this may indeed be a bug introduced in qt-4.5 or > kde 4.2.2 that no one noticed.
Comment 18 Rex Dieter 2009-05-23 16:58:12 EDT
Thanks, when/if you do contact upstream, please provide ml or bugzilla links here so that we can continue to track the issue.
Comment 19 Björn Ruberg 2009-05-31 08:29:18 EDT
Well, I talked back and the kde devs told me that this is indeed expectet behaviour. Must find another way to keep my plasmoid unfocused. You can disregard this bug report.

Note You need to log in before you can comment on or make changes to this bug.