-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications "fly away" (in Debian jessie) #51
Comments
I can confirm this issue. |
@stefano-k: do we have a solution for this? |
Is it reproducible with notifications from any other apps, besides blueman? |
As a workaround blueman has a fall-back notification widget which should allow folks to pair.
|
I've made a script out of blueman's code. It tries to imitate the real notification bubble behavior. #!/usr/bin/python
from blueman.gui.Notification import Notification
from blueman.Functions import get_icon
from gi.repository import cairo
class StatusIconMock:
def get_geometry(self):
return (None, None, cairo.RectangleInt(-8536, -8951, 16, 16), None)
def ok():
print ("Ok")
def err():
print ("Err")
def RequestConfirmation(device, passkey, ok, err):
def on_confirm_action(n, action):
if action == "confirm":
ok()
else:
err()
alias = "Test alias"
notify_message = _("Pairing request for:") + "\n%s" % alias
if passkey:
notify_message += "\n" + _("Confirm value for authentication:") + " <b>%s</b>" % passkey
actions = [["confirm", _("Confirm")], ["deny", _("Deny")]]
Notification("Bluetooth", notify_message, 0,
actions, on_confirm_action, pixbuf=get_icon("blueman", 48), status_icon=StatusIconMock())
RequestConfirmation(None, "Test passkey", ok, err) Can you please run it and check if the notification bubble moves somewhere like described in the report? |
If that code is not enough to reproduce the issue it may be due to the missing |
I've added |
That's hard to add. It's the instance of the applet plugin class StatusIcon. You could also use some GtKWindow or any other object with a compatible |
@monsta: Can you paste latest test script version here? Thanks. |
Ok, script updated |
@monsta You can use the following class to mock the status_icon parameter: import cairo
class StatusIconMock:
def get_geometry(self):
return (None, None, cairo.RectangleInt(-8536, -8951, 16, 16), None) Only the four numeric values are relevant to the |
Ok, now that's something. With this icon mock the notification bubble is always shown in the top left corner (current m-n-d setting is top right one). But it doesn't "flash" or "fly away" - I see it appearing there without any "animations". Also I get a warning, not sure if it's major:
@sunweaver: updated script once more. |
Reproducible for me as well with that script and the notification moves away to the top left corner like it does for @monsta. |
It is expected that the notification is shown in the different corner then configured when positional data is provided, which is what blueman does and so does the mock status icon. The bit that is responsible for this in the daemon can be found here. So if it show up at the top left corner it means the X and Y position are both zero or invalid. And in the script the rectangle has only zero for x, y, width and height. See below [1] updated script that does work. Some questions,
|
@GiedriusS, slider completely ignores the positional data it is given so that is also expected 😄 |
Ah... so it's a feature rather than bug? 😄
For me it always appears right in the X,Y point. No moving.
In my VMs it doesn't matter if I have the applet running before the test or not. The behavior is always the same. |
@monsta, to be clear. You always see the notification top left with blueman and my modified script? Or only one of the two? |
My script shows it in the top left corner, your script shows it near that corner - with some offset (I guess this is due to |
As for blueman itself, I couldn't even find a way to make that notification appear at all (see blueman-project/blueman#329 (comment)). |
Which is what I would expect so mate-notification-dameon is doing it correctly with the script. Mine with the x and y position at 100 and yours with x any y at zero. The reason it is zero with |
Please apply the below debug patch (or add the two lines manually if the patch does not apply) and run the applet from a terminal as described here. This will provide the positional data that is provided to mate-notification-daemon. diff --git a/blueman/gui/Notification.py b/blueman/gui/Notification.py
index fb995a8..0c7f18c 100644
--- a/blueman/gui/Notification.py
+++ b/blueman/gui/Notification.py
@@ -143,6 +143,8 @@ class _NotificationBubble(Notify.Notification):
self.set_timeout(timeout)
if status_icon:
_, screen, area, orientation = status_icon.get_geometry()
+ debug_data = (area.x, area.y, area.width, area.height)
+ dprint("X pos: %s - Y pos: %s - Width: %s - Height: %s" % debug_data)
self.set_hint_int32("x", area.x + area.width / 2)
self.set_hint_int32("y", area.y + area.height / 2) |
My script says: |
Hi all. Regards. Edited |
your link gives an 404 error |
I left here another link http://dai.ly/x49686v |
Does not play here in 2 different browsers, why not uploading a video to a normal cloud like ie. dropbox? |
Sorry, Lets try again. https://youtu.be/_LOB3ry-vo0 |
Debug patch and instructions, #51 (comment) Test script, https://gist.github.com/infirit/8d54897d4a09d8091721 But I highly doubt this is blueman, it just uses libnotify, the rest is up to the notification daemon. And looking at the screencap the notification looks as if it got it's position data confused. |
Do you get this with all our notification themes? |
Also try slider instead of nodoka. |
Hi guys. Standard theme --------------> do nothing or sometimes blinks a bit top left corner. I tried other notifications, as suggested by @raveit65, the only that occurred to me is when you unplug Ethernet cable. This notification works well in all themes. |
Hi, Debian user here. I didn't witness the "flying window" problem but I did see other ones, I guess that they're all related to some extent. In the hope to be helpful, here are my findings. First of all, note that all those problems happened since MATE was built against GTK3, which is the case in Debian from MATE 1.16 IIRC. For all themes, I made four screenshots; normal popups and Bluetooth pairing popups, the first ones taken from my Sid box (1680x1050), which runs mate-notification-daemon with OpenBox/compton (that's why you can see a shadow around popups), and the second ones taken from my laptop running a full-fledged MATE desktop (1280x800), freshly upgraded from Jessie to Stretch (MATE 1.8.1 to 1.16.1); you can see that the various behaviors I describe for all themes are consistent, so OpenBox/compton are clearly not at fault here. So, as was already said in this thread, the "Slider" theme (which, if I'm not mistaken, is the "real" default one, before MATE forked gnome's notification daemon) apparently ignores placement data, which makes it the only one to behave correctly, with a consistent spacing of the popups from the screen/panel borders. All other themes behave more or less badly, so maybe ignoring placement data altogether is the way to go ? The "Coco" theme is the worst of all : popups asking for a Bluetooth pairing are half off-screen. This really hampers usability. Also note the popup placement, which overlaps the panel. The "Default" theme is IMHO slightly better in the sense that its problems are only aesthetic, but there are many of them, making it quite ugly:
The "Nodoka" theme is mostly right, apart of the fact that the Bluetooth popup is aligned with the right border of the screen, making me believe that it may be similar to the awful placing with "Coco", but to a lesser extent. Hope it helps. |
works for me. Using i3. |
Does the issue still exists? |
Filed as DebianBug#779870:
The text was updated successfully, but these errors were encountered: