- Add patch neccessary for reliable notification positioning
This commit is contained in:
parent
a8591af2bd
commit
debcffbd7e
73
libnotify-send-xid-2.patch
Normal file
73
libnotify-send-xid-2.patch
Normal file
@ -0,0 +1,73 @@
|
||||
Index: libnotify/notification.c
|
||||
===================================================================
|
||||
--- libnotify/notification.c (revision 3009)
|
||||
+++ libnotify/notification.c (working copy)
|
||||
@@ -31,6 +31,7 @@
|
||||
# define HAVE_STATUS_ICON
|
||||
# include <gtk/gtkstatusicon.h>
|
||||
#endif
|
||||
+#include <gdk/gdkx.h>
|
||||
|
||||
#define CHECK_DBUS_VERSION(major, minor) \
|
||||
(DBUS_MAJOR_VER > (major) || \
|
||||
@@ -408,6 +409,13 @@
|
||||
{
|
||||
GdkRectangle rect;
|
||||
|
||||
+#if GTK_CHECK_VERSION(2,12,10)
|
||||
+ {
|
||||
+ guint32 xid = gtk_status_icon_get_x11_window_id(priv->status_icon);
|
||||
+ notify_notification_set_hint_uint32(n, "window-xid", xid);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (!gtk_status_icon_get_geometry(priv->status_icon, &screen,
|
||||
&rect, NULL))
|
||||
{
|
||||
@@ -1003,7 +1011,33 @@
|
||||
g_strdup(key), hint_value);
|
||||
}
|
||||
|
||||
+
|
||||
/**
|
||||
+ * notify_notification_set_hint_uint32:
|
||||
+ * @notification: The notification.
|
||||
+ * @key: The hint.
|
||||
+ * @value: The hint's value.
|
||||
+ *
|
||||
+ * Sets a hint with an unsigned 32-bit integer value.
|
||||
+ */
|
||||
+void
|
||||
+notify_notification_set_hint_uint32(NotifyNotification *notification,
|
||||
+ const gchar *key, guint value)
|
||||
+{
|
||||
+ GValue *hint_value;
|
||||
+
|
||||
+ g_return_if_fail(notification != NULL);
|
||||
+ g_return_if_fail(NOTIFY_IS_NOTIFICATION(notification));
|
||||
+ g_return_if_fail(key != NULL && *key != '\0');
|
||||
+
|
||||
+ hint_value = g_new0(GValue, 1);
|
||||
+ g_value_init(hint_value, G_TYPE_UINT);
|
||||
+ g_value_set_uint(hint_value, value);
|
||||
+ g_hash_table_insert(notification->priv->hints,
|
||||
+ g_strdup(key), hint_value);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* notify_notification_set_hint_double:
|
||||
* @notification: The notification.
|
||||
* @key: The hint.
|
||||
Index: libnotify/notification.h
|
||||
===================================================================
|
||||
--- libnotify/notification.h (revision 3009)
|
||||
+++ libnotify/notification.h (working copy)
|
||||
@@ -128,6 +128,8 @@
|
||||
|
||||
void notify_notification_set_hint_int32(NotifyNotification *notification,
|
||||
const gchar *key, gint value);
|
||||
+void notify_notification_set_hint_uint32(NotifyNotification *notification,
|
||||
+ const gchar *key, guint value);
|
||||
|
||||
void notify_notification_set_hint_double(NotifyNotification *notification,
|
||||
const gchar *key, gdouble value);
|
@ -6,9 +6,11 @@
|
||||
Summary: libnotify notification library
|
||||
Name: libnotify
|
||||
Version: 0.4.4
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
URL: http://www.galago-project.org/specs/notification/
|
||||
Source0: http://www.galago-project.org/files/releases/source/%{name}/%{name}-%{version}.tar.bz2
|
||||
# Sent upstream via email
|
||||
Patch0: libnotify-send-xid-2.patch
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -42,6 +44,7 @@ development of programs using %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .send-xid
|
||||
|
||||
%build
|
||||
|
||||
@ -82,6 +85,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/gtk-doc/html/libnotify/*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 10 2008 Colin Walters <walters@redhat.com> - 0.4.4-11
|
||||
- Add patch neccessary for reliable notification positioning
|
||||
|
||||
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.4.4-10
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user