1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 07:02:30 +01:00

Fixed a problem in notification queuing (the coalescing was done wrong if

both name and sender were specified).
This commit is contained in:
dan
1999-11-18 01:43:08 +00:00
parent 1d56ad7615
commit 9eb9198bad

View File

@@ -434,7 +434,28 @@ WMDequeueNotificationMatching(WMNotificationQueue *queue,
int i;
WMNotification *tmp;
if (mask & WNCOnName) {
if ((mask & WNCOnName) && (mask & WNCOnSender)) {
for (i = 0; i < WMGetBagItemCount(queue->asapQueue); i++) {
tmp = WMGetFromBag(queue->asapQueue, i);
if (notification->object == tmp->object &&
strcmp(notification->name, tmp->name) == 0) {
WMRemoveFromBag(queue->asapQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
for (i = 0; i < WMGetBagItemCount(queue->idleQueue); i++) {
tmp = WMGetFromBag(queue->idleQueue, i);
if (notification->object == tmp->object &&
strcmp(notification->name, tmp->name) == 0) {
WMRemoveFromBag(queue->idleQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
} else if (mask & WNCOnName) {
for (i = 0; i < WMGetBagItemCount(queue->asapQueue); i++) {
tmp = WMGetFromBag(queue->asapQueue, i);
@@ -453,8 +474,7 @@ WMDequeueNotificationMatching(WMNotificationQueue *queue,
break;
}
}
}
if (mask & WNCOnSender) {
} else if (mask & WNCOnSender) {
for (i = 0; i < WMGetBagItemCount(queue->asapQueue); i++) {
tmp = WMGetFromBag(queue->asapQueue, i);