Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 428134 - x11-misc/notify-osd - re-enable OSD notification over full screen windows
Summary: x11-misc/notify-osd - re-enable OSD notification over full screen windows
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Ayatana Bugs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-07-26 06:51 UTC by Vince C.
Modified: 2012-07-31 07:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Modified notify-osd with "fullscreen" USE flag (notify-osd-0.9.34.ebuild,1.64 KB, text/plain)
2012-07-26 06:54 UTC, Vince C.
Details
Patch to Canonical's notify-osd code to skip checking for full-screen windows (notify-osd-0.9.34-fullscreen.patch,386 bytes, patch)
2012-07-26 06:57 UTC, Vince C.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vince C. 2012-07-26 06:51:15 UTC
Currently Canonical has hard coded the conditions to display OSD notification in notify-osd-0.9.34 so that they are disabled in the presence full screen windows. This ebuild removes this condition through a USE flag.

Reproducible: Always




To enable OSD notifications over full screen windows, run:

USE=fullscreen emerge -a notify-osd

Without USE=fullscreen Canonical's original code is untouched. I haven't tested the patch yet.

Actually Canonical has added a stub to dnd.c for a future implementation of a Do-Not-Disturb detection through online messaging. IMHO that function should suffice to prevent OSD bubbles from overwriting full-screen windows to those who set their online IM client to the appropriate state... provided they implement the code. Of course it would require running an IM client.
Comment 1 Vince C. 2012-07-26 06:54:39 UTC
Created attachment 319278 [details]
Modified notify-osd with "fullscreen" USE flag

This ebuild is a modified version of notify-osd-0.9.34 that introduces a USE flag (fullscreen) to control whether or not to patch Canonical's code to re-enable OSD popups over full-screen windows.
Comment 2 Vince C. 2012-07-26 06:57:08 UTC
Created attachment 319280 [details, diff]
Patch to Canonical's notify-osd code to skip checking for full-screen windows

This patch comments out a check in dnd.c for full screen windows.
Comment 3 Vince C. 2012-07-26 07:13:18 UTC
(In reply to comment #0)
> Without USE=fullscreen Canonical's original code is untouched. I haven't
> tested the patch yet.

That's it, I have tested the patch, it works. I have a multimedia keyboard and now OSD bubbles appear over my full-screen terminal or web browser when I press volume control keys.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2012-07-26 17:36:41 UTC
Comment on attachment 319278 [details]
Modified notify-osd with "fullscreen" USE flag

--- notify-osd-0.9.34.ebuild    2012-05-07 14:02:31.000000000 +0200
+++ -   2012-07-26 19:36:29.304994474 +0200
@@ -3,7 +3,7 @@
 # $Header: /var/cvsroot/gentoo-x86/x11-misc/notify-osd/notify-osd-0.9.34.ebuild,v 1.3 2012/05/05 04:53:41 jdhore Exp $
 
 EAPI=4
-inherit autotools gnome2-utils multilib savedconfig
+inherit autotools gnome2-utils multilib savedconfig eutils
 
 DESCRIPTION="Canonical's on-screen-display notification agent"
 HOMEPAGE="http://launchpad.net/notify-osd"
@@ -12,7 +12,7 @@
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="minimal"
+IUSE="minimal fullscreen"
 
 COMMON_DEPEND=">=dev-libs/dbus-glib-0.98
        >=dev-libs/glib-2.16
@@ -35,6 +35,9 @@
 DOCS=( AUTHORS ChangeLog NEWS README TODO )
 
 src_prepare() {
+       # (Re-) Enable notifications with full screen windows
+       use fullscreen && epatch "${FILESDIR}/${P}-fullscreen.patch"
+
        sed -i -e 's:noinst_PROG:check_PROG:' tests/Makefile.am || die
        restore_config src/{bubble,defaults}.c
        eautoreconf
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-07-30 20:59:05 UTC
The patch should be enchanced into a runtime configurable option and sent upstream

I'm purposely not diverging or carrying Gentoo patches for the Ubuntu Ayatana stuff

The current ebuild saves files bubble.c and default.c with savedconfig.eclass now, I've included osd.c there now too so you can keep on configuring your own like this somewhat a bit more easily
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-07-30 21:01:53 UTC
> savedconfig.eclass now, I've included osd.c there now too so you can keep on

*I meant dnd.c
Comment 7 Vince C. 2012-07-31 07:30:23 UTC
(In reply to comment #5)
> The current ebuild saves files bubble.c and default.c with
> savedconfig.eclass now, I've included *dnd.c* there now too so you can keep on
> configuring your own like this somewhat a bit more easily

Thanks a lot for your hints, Samuli. I guess I'll need to get a bit more used to Gentoo internals as well. I'm not familiar with that kind of flexibility portage offers through savedconfigs. I'll dig into it with pleasure.


> The patch should be enchanced into a runtime configurable option and sent
> upstream
> 
> I'm purposely not diverging or carrying Gentoo patches for the Ubuntu
> Ayatana stuff

Well, that's precisely the reason I wrote a patch for dnd.c as I read the maintainers of notify-osd purposely disabled OSD when full-screen windows are present. There didn't seem to be any will to go back... unless it is what I saw in the code.

I wanted a quick (and most probably dirty) fix for a situation that made me miss quite a lot of notifications I didn't want to miss anymore. Considering I was certainly not the only one, I wrote this quick patch in the hope it'd be useful to more people.

I'll investigate the configurable option (I have no knowledge on how to do that right now), that's the direction I thought would be best for that, thanks a lot for the hint.

Though I don't base much of my hopes on submitting a more elaborate solution upstream, I'll do it yet, I won't get nothing if I don't try, right? ;)

Thanks a lot for accepting my patch anyway.