emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113742: * xselect.c (x_send_client_event): Set send


From: Jan D.
Subject: [Emacs-diffs] trunk r113742: * xselect.c (x_send_client_event): Set send_event and serial, memset
Date: Wed, 07 Aug 2013 16:59:31 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113742
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15034
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Wed 2013-08-07 18:59:23 +0200
message:
  * xselect.c (x_send_client_event): Set send_event and serial, memset
  data.l as it might be bigger than data.b.   Use 24 bit mask to
  XSendEvent.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xselect.c                  xselect.c-20091113204419-o5vbwnq5f7feedwu-543
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-08-07 13:49:47 +0000
+++ b/src/ChangeLog     2013-08-07 16:59:23 +0000
@@ -1,3 +1,9 @@
+2013-08-07  Jan Djärv  <address@hidden>
+
+       * xselect.c (x_send_client_event): Set send_event and serial, memset
+       data.l as it might be bigger than data.b.   Use 24 bit mask to
+       XSendEvent (Bug#15034).
+
 2013-08-07  Eli Zaretskii  <address@hidden>
 
        * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title

=== modified file 'src/xselect.c'
--- a/src/xselect.c     2013-08-03 03:29:03 +0000
+++ b/src/xselect.c     2013-08-07 16:59:23 +0000
@@ -2628,6 +2628,8 @@
 
   block_input ();
 
+  event.xclient.send_event = True;
+  event.xclient.serial = 0;
   event.xclient.message_type = message_type;
   event.xclient.display = dpyinfo->display;
 
@@ -2635,19 +2637,19 @@
      when sending to the root window.  */
   event.xclient.window = to_root ? FRAME_OUTER_WINDOW (f) : wdest;
 
-
-  memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b));
+  memset (event.xclient.data.l, 0, sizeof (event.xclient.data.l));
   x_fill_property_data (dpyinfo->display, values, event.xclient.data.b,
                         event.xclient.format);
 
   /* If event mask is 0 the event is sent to the client that created
      the destination window.  But if we are sending to the root window,
-     there is no such client.  Then we set the event mask to 0xffff.  The
+     there is no such client.  Then we set the event mask to 0xffffff.  The
      event then goes to clients selecting for events on the root window.  */
   x_catch_errors (dpyinfo->display);
   {
     int propagate = to_root ? False : True;
-    unsigned mask = to_root ? 0xffff : 0;
+    long mask = to_root ? 0xffffff : 0;
+
     XSendEvent (dpyinfo->display, wdest, propagate, mask, &event);
     XFlush (dpyinfo->display);
   }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]