notify-osd uses multihead invisible area

Bug #475373 reported by Cristian Klein
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Notify OSD
In Progress
High
Karl Lattimer
Nominated for Lucid by Mark Stosberg

Bug Description

I have the following screen configuration:

$ xrandr -q
Screen 0: minimum 320 x 200, current 2480 x 1600, maximum 2480 x 1600
VGA-0 connected 1200x1600+0+0 left (normal left inverted right x axis y axis) 367mm x 275mm
LVDS connected 1280x800+1200+800 (normal left inverted right x axis y axis) 331mm x 207mm

Notice the invisible area in the top-right part. I have a single gnome-panel located on the bottom part of LVDS. notify-osd will put bubbles in the invisible area:

$ /usr/lib/notify-osd/notify-osd --debug
* (notify-osd:7110): DEBUG: selecting monitor 0 at (0,0) - 1200x1600
** (notify-osd:7110): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:7110): DEBUG: top corner at: 2077, -3
** (notify-osd:7110): DEBUG: selecting monitor 0 at (0,0) - 1200x1600
** (notify-osd:7110): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:7110): DEBUG: top corner at: 2077, -3
** (notify-osd:7110): DEBUG: [2009-11-05T14:01:02-00:00, notify-send, id:0, icon:] sdad

I propose two things:
1) notify-osd should not fallback to the workarea, but use the selected monitor.
2) notify-osd should look for any panel, whether top or bottom.

Related branches

Revision history for this message
Cristian Klein (cristiklein) wrote :
Revision history for this message
Mirco Müller (macslow) wrote :

Your patch introduces new (internal) API and you don't test for the validity of the passed in pointer to "top". That needs to be fixed.

Revision history for this message
Cristian Klein (cristiklein) wrote :

I fixed the issues you highlighted. Anything else?

Revision history for this message
Robert Collins (lifeless) wrote :

Cristian, I suggest you make a merge proposal with your changes, to get into the review system.

Changed in notify-osd:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Chow Loong Jin (hyperair) wrote :

A related issue is that notify-osd does not recognize a panel at the top of the right monitor as being "top-most", due to this snippet of code in src/defaults.c:

    /* select only the top panel */
    gdk_window_get_frame_extents (win, &frame);
    if (frame.x != 0 || frame.y != 0)
        goto failed;

Seeing as the patch does not change this condition, I believe it isn't fixed in the patch either.

Revision history for this message
Cristian Klein (cristiklein) wrote :

They it does:

- if (frame.x != 0 || frame.y != 0)
- goto failed;

Revision history for this message
Cristian Klein (cristiklein) wrote :

* Yes, it does.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

You sure? This doesn't seem to agree:
+ if (frame.x != 0 || frame.y != 0)
+ *ptop = FALSE;

Revision history for this message
Cristian Klein (cristiklein) wrote :

Before, it "failed" i.e. the function returned "this window is not a panel". The patch makes it returns "this is a panel, but I warn you, it's not a top-panel".

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 475373] Re: notify-osd uses multihead invisible area

On Tuesday 08,December,2009 04:03 AM, Cristian KLEIN wrote:
> Before, it "failed" i.e. the function returned "this window is not a
> panel". The patch makes it returns "this is a panel, but I warn you,
> it's not a top-panel".
>
But my point is that it *is* a top-panel. And notify-osd does not bother with
non-top panels, or in the case of your patch, non-top-or-bottom panels.

Please correct me if I'm mistaken.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
Cristian Klein (cristiklein) wrote :

On 07/12/2009 21:12, Chow Loong Jin wrote:
> On Tuesday 08,December,2009 04:03 AM, Cristian KLEIN wrote:
>> Before, it "failed" i.e. the function returned "this window is not a
>> panel". The patch makes it returns "this is a panel, but I warn you,
>> it's not a top-panel".
>>
> But my point is that it *is* a top-panel. And notify-osd does not bother with
> non-top panels, or in the case of your patch, non-top-or-bottom panels.
>
> Please correct me if I'm mistaken.

What exactly do you mean with "non-top-or-bottom panels"? Do you mean
"lateral" panels? I don't know how many people use something like that.
And anyway, they are filtered by the next few lines of code:

if (frame.width < frame.height)
    goto failed;

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Tuesday 08,December,2009 04:29 AM, Cristian KLEIN wrote:
> On 07/12/2009 21:12, Chow Loong Jin wrote:
>> On Tuesday 08,December,2009 04:03 AM, Cristian KLEIN wrote:
>>> Before, it "failed" i.e. the function returned "this window is not a
>>> panel". The patch makes it returns "this is a panel, but I warn you,
>>> it's not a top-panel".
>>>
>> But my point is that it *is* a top-panel. And notify-osd does not bother with
>> non-top panels, or in the case of your patch, non-top-or-bottom panels.
>>
>> Please correct me if I'm mistaken.
>
> What exactly do you mean with "non-top-or-bottom panels"? Do you mean
> "lateral" panels? I don't know how many people use something like that.
> And anyway, they are filtered by the next few lines of code:
>
> if (frame.width < frame.height)
> goto failed;
>
I mean panels which notify-osd ignore when figuring out where to place
notifications. I'm not sure exactly what type of panel notify-osd is supposed to
ignore, but I'm very sure that a panel spanning the width of my right display
should *not* be ignored.

Speaking of which, yet another related issue would be having multiple panels at
the top. If you add a second panel to the top, just under the first panel,
notify-osd will render notifications on top of that panel, which isn't really
desirable, I should think.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
eval- (eval-) wrote :

I have a similar problem, I think. With two monitors, a 1280x1024 LCD above my Acer 3810T laptop's 1366x768, my notifications are only partially on the upper screen (improperly right-aligned). Thus I can only see the first part of any sentence popping up from pidgin, etc. Works fine with no external.

$ xrandr -q
Screen 0: minimum 320 x 200, current 1366 x 1792, maximum 8192 x 8192
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
...
LVDS1 connected 1366x768+0+1024 (normal left inverted right x axis y axis) 293mm x 164mm

$ /usr/lib/notify-osd/notify-osd --debug
** (notify-osd:22729): DEBUG: selecting monitor 0 at (0,0) - 1280x1024
** (notify-osd:22729): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:22729): DEBUG: top corner at: 1031, 22

notify-osd is pretty but has a been a royal pain in the ass due to lack of any straightforward configurability.

Revision history for this message
Nick Lawson (vektuz-gmail) wrote :

I get the same problem.

$ xrandr -q
Screen 0: minimum 3840 x 1485, current 3840 x 1485, maximum 3840 x 1485
default connected 3840x1485+0+0 0mm x 0mm
   3840x1485 50.0*

$ /usr/lib/notify-osd/notify-osd --debug
** (notify-osd:19713): DEBUG: selecting monitor 0 at (0,0) - 1920x1200
** (notify-osd:19713): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:19713): DEBUG: top corner at: 3504, -3

This is not good, because my screen geometry is one big screen at 1920x1200 (0,0) and a much smaller screen to the right of that, but offset about 400 units down. Which means there's a dead zone above it.

Why doesn't it just use the primary screen...? If I could just specify which monitor to use it'd be perfect since then it'd appear in the top right of THIS monitor

Revision history for this message
Tobias Jost (tjost) wrote :

The "Second attempt"-Patch fixes my problems with Notifications being displayed outside the visible screen estate.

The Bubbles are a bit too high (above the panel), but it's better than having no notifications visible.

I uploaded a patched deb to my ppa: https://launchpad.net/~tjost/+archive/notify-osd

Revision history for this message
Nick Lawson (vektuz-gmail) wrote :

Thank you. This did fix it for me, well, mostly. I don't use a panel at
the top of the screen so it was fine.

On Wed, May 5, 2010 at 1:23 PM, Tobias Jost <email address hidden> wrote:

> The "Second attempt"-Patch fixes my problems with Notifications being
> displayed outside the visible screen estate.
>
> The Bubbles are a bit too high (above the panel), but it's better than
> having no notifications visible.
>
> I uploaded a patched deb to my ppa:
> https://launchpad.net/~tjost/+archive/notify-osd<https://launchpad.net/%7Etjost/+archive/notify-osd>
>
> --
> notify-osd uses multihead invisible area
> https://bugs.launchpad.net/bugs/475373
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
ArangeL (softwarej) wrote :

Tobias Jost,
"I uploaded a patched deb to my ppa: https://launchpad.net/~tjost/+archive/notify-osd" This fix work correctly. Can someone release this fix?

Changed in notify-osd:
status: Triaged → Fix Committed
Revision history for this message
Pierre Dennert (schokobescher) wrote :

Thank you!
I had the same problem.
Also auto hiding the panel would result in the original behavior.

Your patch works great so far

Revision history for this message
Christoph Blecker (toph) wrote :

Changing status as this was just a patched PPA, not a full commit.

Changed in notify-osd:
status: Fix Committed → Confirmed
Revision history for this message
ArangeL (softwarej) wrote :

How we can fix it?
We have a .patch that fix this issue.
We need to commit it, how can we do it?

Karl Lattimer (karl-qdh)
Changed in notify-osd:
assignee: nobody → Karl Lattimer (karl-qdh)
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Could someone please provide screenshots of this in a variety of configurations so I can verify that the fix actually works? I have no ability for a multi-head setup right now.

Karl Lattimer (karl-qdh)
Changed in notify-osd:
status: Confirmed → In Progress
Revision history for this message
Tobias Jost (tjost) wrote :

@Karl:

Notifications are always shown top right of the virtual screen. Screenshot attached (only visible when screen is "exposed", else there is no notifiication at all.). I can't test it now, but the aforementioned patch fixes this behaviour for Lucid (notify-osd 0.9.29-ubuntu2), where the notification bubbles appear at the top right spot of the monitor where the mousecursor currently is. When on a screen having a top panel, the notifications are moved down accordingly.

I hope the patch (not done by me!) is applicable for maverick. Good Luck, don't hesitate to contact me if you need help, although I'm fairly new to ubuntu bugfixing.

Revision history for this message
aknagi (andrew-nagi) wrote :

@karl png screenshots attached.

The screenshot shows a little message appearing in the top right of the workspace, which is bad because this is an invisible part of the screen that is not displayed.

I echo the thoughts of those who feel a little configurability would be a welcome addition to this package.

// version is 0.9.29
=================

nagi@cap ~ $ xrandr
Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 2944 x 2944
DFP2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
<snip>
CRT1 connected 1024x768+1920+312 (normal left inverted right x axis y axis) 0mm x 0mm
<snip>

nagi@cap ~/rails/timeline $ /usr/lib/notify-osd/notify-osd --debug
** (notify-osd:7729): DEBUG: [2010-11-26T00:23:22-00:00, notify-send, id:0, icon:] help

** (notify-osd:7729): DEBUG: selecting monitor 0 at (0,0) - 1920x1080
** (notify-osd:7729): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:7729): DEBUG: top corner at: 2609, -3
** (notify-osd:7729): DEBUG: selecting monitor 0 at (0,0) - 1920x1080
** (notify-osd:7729): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:7729): DEBUG: top corner at: 2609, -3
** (notify-osd:7729): DEBUG: [2010-11-26T00:37:05-00:00, notify-send, id:0, icon:] Test
Hello World

Revision history for this message
aknagi (andrew-nagi) wrote :

I confirm that the version at...

  https://launchpad.net/~tjost/+archive/notify-osd"

...fixed the problem on my Amd64 system, which is running Mint9/Gnome.

Thanks to the patch creator and Tobias.

Revision history for this message
Eduardo Larroya (zdv80) wrote :

Thanks, the patch also solved my dual-monitor problem...

Revision history for this message
Kamil Jakubowski (kamil-9) wrote :

@Tobias Jost,
Can you prepare package with patch for natty? Fix of the bug (duplicate of this) https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/331369 is not available yet for natty, so I would like to use your patch, but it was prepared for lucid, so it doesn't work for natty:

after adding your PPA:
sudo apt-get update:

W: Download failed http://ppa.launchpad.net/tjost/notify-osd/ubuntu/dists/natty/main/source/Sources 404 Not Found

W: Download failed http://ppa.launchpad.net/tjost/notify-osd/ubuntu/dists/natty/main/binary-i386/Packages 404 Not Found

TIA ;-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.