[PATCH] Only store Window in FindMessageData

Julien Danjou julien at danjou.info
Thu Jan 29 06:37:41 PST 2009


This is enough, we do not need to store the full XEvent.

Signed-off-by: Julien Danjou <julien at danjou.info>
---
 libsn/sn-xmessages.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libsn/sn-xmessages.c b/libsn/sn-xmessages.c
index c2fc8d1..e10e2f1 100644
--- a/libsn/sn-xmessages.c
+++ b/libsn/sn-xmessages.c
@@ -275,7 +275,7 @@ some_handler_handles_event (SnDisplay *display,
 
 typedef struct
 {
-  XEvent *xevent;
+  Window window;
   SnXmessage *message;
 } FindMessageData;
 
@@ -286,7 +286,7 @@ find_message_foreach (void *value,
   SnXmessage *message = value;
   FindMessageData *fmd = data;
   
-  if (fmd->xevent->xclient.window == message->xwindow)
+  if (fmd->window == message->xwindow)
     {
       fmd->message = message;
       return FALSE;
@@ -312,7 +312,7 @@ add_event_to_messages (SnDisplay *display,
    */
 #define MAX_MESSAGE_LENGTH 4096
   
-  fmd.xevent = xevent;
+  fmd.window = xevent->xclient.window;
   fmd.message = NULL;
 
   sn_internal_display_get_xmessage_data (display, NULL,
-- 
1.5.6.5



More information about the xdg mailing list