summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/notification_area/na-tray-manager.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/applets/notification_area/na-tray-manager.c b/applets/notification_area/na-tray-manager.c
index 1483bcd0..6b61adea 100644
--- a/applets/notification_area/na-tray-manager.c
+++ b/applets/notification_area/na-tray-manager.c
@@ -394,13 +394,17 @@ na_tray_manager_handle_begin_message (NaTrayManager *manager,
if (!socket)
return;
+ timeout = xevent->data.l[2];
+ len = xevent->data.l[3];
+ id = xevent->data.l[4];
+
/* Check if the same message is already in the queue and remove it if so */
for (p = manager->messages; p; p = p->next)
{
PendingMessage *pmsg = p->data;
if (xevent->window == pmsg->window &&
- xevent->data.l[4] == pmsg->id)
+ id == pmsg->id)
{
/* Hmm, we found it, now remove it */
pending_message_free (pmsg);
@@ -410,9 +414,7 @@ na_tray_manager_handle_begin_message (NaTrayManager *manager,
}
}
- timeout = xevent->data.l[2];
- len = xevent->data.l[3];
- id = xevent->data.l[4];
+
if (len == 0)
{
@@ -440,6 +442,9 @@ na_tray_manager_handle_cancel_message (NaTrayManager *manager,
{
GList *p;
GtkSocket *socket;
+ long id;
+
+ id = xevent->data.l[2];
/* Check if the message is in the queue and remove it if so */
for (p = manager->messages; p; p = p->next)
@@ -447,7 +452,7 @@ na_tray_manager_handle_cancel_message (NaTrayManager *manager,
PendingMessage *msg = p->data;
if (xevent->window == msg->window &&
- xevent->data.l[4] == msg->id)
+ id == msg->id)
{
pending_message_free (msg);
manager->messages = g_list_remove_link (manager->messages, p);