aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2006-01-24 20:29:11 +0000
committermallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2006-01-24 20:29:11 +0000
commit50235f31b001025a222b634e8b2baf4a92789406 (patch)
tree7faed84bda2a7c02b99a32c17b545c45c88526a4
parentf7625c5861478a2b76d3fc8726dda090e9c78ff8 (diff)
downloadmatchbox-panel-50235f31b001025a222b634e8b2baf4a92789406.tar.gz
matchbox-panel-50235f31b001025a222b634e8b2baf4a92789406.tar.bz2
matchbox-panel-50235f31b001025a222b634e8b2baf4a92789406.zip
2006-01-24 Matthew Allum <mallum@openedhand.com>
* src/msg.c: (msg_win_create), (msg_handle_events): * src/msg.h: * src/panel.c: (panel_handle_client_message): * src/panel.h: Apply patch from Phil Blundell to implement cancelation of systray popup messages. git-svn-id: https://svn.o-hand.com/repos/matchbox/trunk/matchbox-panel@1299 b067294f-1dea-0310-9683-c47a78595994
-rw-r--r--ChangeLog9
-rw-r--r--src/msg.c17
-rw-r--r--src/msg.h1
-rw-r--r--src/panel.c1
-rw-r--r--src/panel.h1
5 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e856b1..047eb97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2006-01-24 Matthew Allum <mallum@openedhand.com>
+ * src/msg.c: (msg_win_create), (msg_handle_events):
+ * src/msg.h:
+ * src/panel.c: (panel_handle_client_message):
+ * src/panel.h:
+ Apply patch from Phil Blundell to implement cancelation
+ of systray popup messages.
+
+2006-01-24 Matthew Allum <mallum@openedhand.com>
+
* applets/mb-applet-wireless.c: (find_iwface):
Workaround for issues with Z hostap driver that
presents multiple wireless interfaces. The first
diff --git a/src/msg.c b/src/msg.c
index 1b1ddec..b94f765 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -547,6 +547,22 @@ msg_win_create(MBPanel *panel,
XFreePixmap(panel->dpy, mask);
}
+void
+msg_cancel (MBPanel *panel, XClientMessageEvent *e)
+{
+ MBPanelApp *sender;
+
+ if ((sender = panel_app_get_from_window(panel, e->window )) == NULL)
+ return;
+
+ if (panel->msg_win
+ && panel->msg_win_sender == sender
+ && panel->msg_sender_id == e->data.l[2])
+ {
+ XDestroyWindow(panel->dpy, panel->msg_win);
+ panel->msg_win = None;
+ }
+}
void
msg_handle_events(MBPanel *panel, XEvent *e)
@@ -566,6 +582,7 @@ msg_handle_events(MBPanel *panel, XEvent *e)
panel->msg_starttime = msg->starttime;
panel->msg_timeout = msg->timeout;
panel->msg_win_sender = msg->sender;
+ panel->msg_sender_id = msg->id;
panel->msg_has_context = False;
diff --git a/src/msg.h b/src/msg.h
index 5fe90ef..f3fcbb8 100644
--- a/src/msg.h
+++ b/src/msg.h
@@ -16,5 +16,6 @@ void msg_destroy(MBPanel *d, MBPanelMessageQueue *m);
void msg_add_data(MBPanel *d, XClientMessageEvent *e);
void msg_handle_events(MBPanel *d, XEvent *e);
void msg_handle_timeouts(MBPanel *d);
+void msg_cancel(MBPanel *d, XClientMessageEvent *e);
#endif
diff --git a/src/panel.c b/src/panel.c
index f20e134..5713e4d 100644
--- a/src/panel.c
+++ b/src/panel.c
@@ -886,6 +886,7 @@ panel_handle_client_message(MBPanel *panel, XClientMessageEvent *e)
break;
case SYSTEM_TRAY_CANCEL_MESSAGE:
DBG("%s() is SYSTEM_TRAY_CANCEL_MESSAGE\n", __func__ );
+ msg_cancel(panel, e);
break;
}
return;
diff --git a/src/panel.h b/src/panel.h
index 20f6be6..7e54fa4 100644
--- a/src/panel.h
+++ b/src/panel.h
@@ -212,6 +212,7 @@ typedef struct _panel {
int msg_timeout;
MBPanelApp *msg_win_sender;
Bool msg_has_context;
+ unsigned long msg_sender_id;
int msg_context_y1, msg_context_y2;
GC msg_gc;