Bug 357652 - Notification popup don't appear if panel is in "Auto Hide" or "Windows Can Cover" mode
Summary: Notification popup don't appear if panel is in "Auto Hide" or "Windows Can Co...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.5.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-07 14:11 UTC by Raghavendra kamath
Modified: 2016-01-07 18:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.5.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2016-01-07 14:11:03 UTC
After the 5.5.3 update the notification Popups stopped appearing,
If the panel is in "Auto Hide" or "Windows Can Cover" mode the notification popup don't appear, the only way to bring them back is to switch panel to "Always Visible" mode and back again to these modes. This needs to be done in every restart.


Reproducible: Always

Steps to Reproduce:
1.Switch panel to Windows can cover mode 
2.restart
3.test notifications

Actual Results:  
notification popup don't appear

Expected Results:  
notification popups should appear regardless of the panel view mode

Another user also experienced this, you can take a look at the discussion on kde forum here -> https://forum.kde.org/viewtopic.php?f=289&t=130420
Comment 1 Rog131 2016-01-07 14:28:11 UTC
At here, the notification is shown very briefly:

When capturing the screen with the ffmpeg & framerate 30 the notification is shown only in one frame. Notification is shown at the left top corner

Full: http://i.imgur.com/CKuUWMe.jpg
Partial: http://i.imgur.com/7MHFjSU.png

Should be at the left low corner - Auto Hide disabled: http://i.imgur.com/UERw0Dd.png
Comment 2 Raghavendra kamath 2016-01-07 14:48:33 UTC
yes , on closer look, as Rog131 said they appear very briefly sometimes
Comment 3 Martin Klapetek 2016-01-07 17:28:22 UTC
Thanks for the report

Are you able to test patches/run version from git?
Comment 4 Martin Klapetek 2016-01-07 17:30:16 UTC
Actually now I can reproduce it. Investigating.
Comment 5 Martin Klapetek 2016-01-07 17:54:36 UTC
Ok I have a fix that you can easily test yourself.

Open Konsole and type this:

sudo kate /usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/Notifications.qml

...enter your own password and that should open kate with the file.

In the file, towards the bottom around line 185, locate the line that has

"NotificationsHelper {"

and replace the whole NotificationsHelper block (from the line with "{" to the line with "}") with this block:

    NotificationsHelper {
        id: notificationPositioner
        popupLocation: plasmoid.nativeInterface.screenPosition

        Component.onCompleted: {
            notificationPositioner.setPlasmoidScreenGeometry(plasmoid.nativeInterface.availableScreenRect);
        }
    }

Then just save it, press alt+space to run krunner and type "kquitapp5 plasmashell && plasmashell"
to restart Plasma. Everything should now work.

If you could confirm, that would be ace.
Comment 6 Raghavendra kamath 2016-01-07 18:20:57 UTC
@ Martin Klapetek
Thank you for such detailed steps and explanation,
I tried what you said and it seems to have perfectly fixed the issue for me. I even rebooted the machine now the notifications show in correct place and are visible

will the changed file be overwritten in next update?
Comment 7 Martin Klapetek 2016-01-07 18:28:25 UTC
I will push the change to the repo, so with next update it
/should/ get overwritten (I think apt in *buntu asks if you
want to overwrite it).

In the worst case, just remove the "Component.onCompleted"
block you just added (including the empty line above) the same
way before you upgrade and it should be fine hopefully.
Comment 8 Martin Klapetek 2016-01-07 18:33:09 UTC
Git commit b806d726ccfc2507bb7636029e60a9b02b6da3a3 by Martin Klapetek.
Committed on 07/01/2016 at 18:32.
Pushed by mklapetek into branch 'Plasma/5.5'.

[notifications] Ensure the applet gets correct screen geometry when loaded

The bug happens because the binary part of the applet sends out the
available screen resolution _before_ the applet is fully loaded AND also
whenever the screen changes in any way. This works fine with the non-
auto hiding panel because once the panel gets loaded, it changes the
available screen area (cause the part where panel is is reserved and
windows cannot go there) and that change is told to the binary part of
the applet and that part tells the positioning part.

However with the auto-hiding panel the signal about the changed
available screen space never arrives because the panel does not take
that space when it loads. And so the applet was left with "available
screen space = 0x0" because the first signal is sent out before the
applet is fully loaded.

So the obvious fix is to simply ask for the available screen space
_after_ the applet has finished loading.
FIXED-IN: 5.5.4

M  +4    -0    applets/notifications/package/contents/ui/Notifications.qml

http://commits.kde.org/plasma-workspace/b806d726ccfc2507bb7636029e60a9b02b6da3a3