diff options
author | infirit <[email protected]> | 2014-11-21 19:09:42 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-22 15:13:50 +0100 |
commit | aa4e6f2cdcb5fedd208f99216e5443caf200245e (patch) | |
tree | 2c54b38f43bdb3ba7fcfb661e710c765af827f79 /applets | |
parent | 942cbeb00cc425fcce0f416f3ae1c76e49610ebc (diff) | |
download | mate-panel-aa4e6f2cdcb5fedd208f99216e5443caf200245e.tar.bz2 mate-panel-aa4e6f2cdcb5fedd208f99216e5443caf200245e.tar.xz |
na: Fix handling of SYSTEM_TRAY_CANCEL_MESSAGE
We were not looking at the right field for the message ID: the ID is in
the 4th field for BEGIN_MESSAGE, but 2nd field for CANCEL_MESSAGE.
Taken from gnome-panel commit: 8ff843458425d525b10fc5d9b7bb357248c637c8
From: Vincent Untz <[email protected]>
Diffstat (limited to 'applets')
-rw-r--r-- | applets/notification_area/na-tray-manager.c | 15 |
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); |