Commits

Anonymous committed 08cf83d

* Makefile (AUTHOR_VERSION): 0.1 -> 0.2, marked as stable, but
need a little more testing.

* lisp/xlib-xwin.el (X-Attr): [fix] X-Attr-mapstate removed.
* lisp/xlib-xwin.el (X-Atom-equal): [new] Return non-nil if two
atoms represent same X resource.

* lisp/xlib-xr.el (X-Event-XXX): autoloadable.
* lisp/xlib-xr.el (X-default-timeout): [new] Default X reading
timeout, now 60 seconds. It should be large if there sure that
xlib works properly.
* lisp/xlib-xr.el (X-Dpy-parse-message): [bug fix] Uses
`X-Dpy-reqseq' now to check request sequence matching.

* lisp/xlib-xlib.el (misc): Tiny fixes.
* lisp/xlib-xlib.el (XSyncEvents): [new]

* lisp/xlib-xc.el (X-Dpy-put-property): [fix] typo.
* lisp/xlib-xc.el (X-Dpy-reqseq): [new] To performe request id
truncation.

* lisp/xlib-const.el (X-True): [new]
* lisp/xlib-const.el (X-False): [new]

Comments (0)

Files changed (7)

+2004-05-05  Zajcev Evgeny  <zevlg@yandex.ru>
+
+	* Makefile (AUTHOR_VERSION): 0.1 -> 0.2, marked as stable, but
+	need a little more testing.
+
+	* lisp/xlib-xwin.el (X-Attr): [fix] X-Attr-mapstate removed.
+	* lisp/xlib-xwin.el (X-Atom-equal): [new] Return non-nil if two
+	atoms represent same X resource.
+
+	* lisp/xlib-xr.el (X-Event-XXX): autoloadable.
+	* lisp/xlib-xr.el (X-default-timeout): [new] Default X reading
+	timeout, now 60 seconds.  It should be large if there sure that
+	xlib works properly.
+	* lisp/xlib-xr.el (X-Dpy-parse-message): [bug fix] Uses
+	`X-Dpy-reqseq' now to check request sequence matching.
+
+	* lisp/xlib-xlib.el (misc): Tiny fixes.
+	* lisp/xlib-xlib.el (XSyncEvents): [new]
+
+	* lisp/xlib-xc.el (X-Dpy-put-property): [fix] typo.
+	* lisp/xlib-xc.el (X-Dpy-reqseq): [new] To performe request id
+	truncation.
+
+	* lisp/xlib-const.el (X-True): [new]
+	* lisp/xlib-const.el (X-False): [new]
+
 2004-03-29  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.08 released.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.08
-AUTHOR_VERSION = 0.1
+AUTHOR_VERSION = 0.2
 MAINTAINER = Zajcev Evgeny <zevlg@yandex.ru>
 PACKAGE = xlib
 PKG_TYPE = regular

lisp/xlib-const.el

 (defconst xlib-version "xlib(xemacs-package): $Revision$")
 
 ;;;###autoload
+(defconst X-False 0 "False")
+;;;###autoload
+(defconst X-True 1 "True")
+
+;;;###autoload
 (defconst X-CopyFromParent 0 "CopyFromParent opcode.")
 ;;;###autoload
 (defconst X-InputOutput 1 "InputOutput opcode.")
   )
 
 ;;;###autoload
+(defmacro X-Dpy-reqseq (xdpy)
+  "Extract least significant 16bit from request sequenc id in XDPY."
+  `(logand (X-Dpy-rseq-id ,xdpy) 65535))
+
+;;;###autoload
 (defmacro X-Dpy-put-property (xdpy prop val)
   "Put property PROP with value VAL in XDPY's properties list."
-  `(setf (X-Dpy-properties xdpy)
+  `(setf (X-Dpy-properties ,xdpy)
 	 (plist-put (X-Dpy-properties ,xdpy) ,prop ,val)))
 
 ;;;###autoload

lisp/xlib-xlib.el

   (X-Win-p win 'XMapWindow)
 
   (let ((ListOfFields
-	 (list [1 8 ]			;opcode
+	 (list [1 8]			;opcode
 	       [1 nil]			;unused
 	       [2 2]			;length of request (in 4s)
 	       [4 (X-Win-id win)])))	;window to map
 Returns nil or X-Win structure."
   (X-Dpy-p xdpy 'XGetSelectionOwner)
 
-   (let* ((ListOfFields
-	   (list [1 23]			;request value
-		 [1 nil]		;unused
-		 [2 2]			;length
-		 [4 (X-Atom-id selection-atom)])) ;selection atom
-	  (msg (X-Create-message ListOfFields))
-	  (ReceiveFields
-	   (list [1 success]		;success field
-		 nil
-		 (list [1 nil]		;unused
-		       [2 integerp]	;sequence
-		       [4 nil]		;length
-		       [4 integerp]	;owner window
-		       [20 nil])))	;pad
-	  r win)
-     (setq r (X-Dpy-send-read xdpy msg ReceiveFields))
-     (when (car r)
-       (setq win (X-Win-find-or-make xdpy (nth 2 r))))
-     win))
+  (let* ((ListOfFields
+          (list [1 23]			;request value
+                [1 nil]                 ;unused
+                [2 2]			;length
+                [4 (X-Atom-id selection-atom)])) ;selection atom
+         (msg (X-Create-message ListOfFields))
+         (ReceiveFields
+          (list [1 success]		;success field
+                nil
+                (list [1 nil]		;unused
+                      [2 integerp]	;sequence
+                      [4 nil]		;length
+                      [4 integerp]	;owner window
+                      [20 nil])))	;pad
+         r win)
+    (setq r (X-Dpy-send-read xdpy msg ReceiveFields))
+    (when (car r)
+      (setq win (X-Win-find-or-make xdpy (nth 2 r))))
+    win))
 
 ;;;###autoload
-(defun XConvertSelection (xdpy selection-atom target prop requestor &optional time)
+(defun XConvertSelection (xdpy selection target prop requestor &optional time)
   "ConvertSelection."
-  (error "XConvertSelection not implemented.")
-  )
+  (X-Dpy-p xdpy 'XConvertSelection)
+
+  (let* ((ListOfFields
+	  (list [1 24]			;request value
+		[1 nil]			;unused
+		[2 6]			;length
+		[4 (if requestor (X-Win-id requestor) X-None)] ;owner window
+		[4 (X-Atom-id selection)] ; selection atom
+		[4 (X-Atom-id target)]  ; target atom
+		[4 (if prop (X-Atom-id prop) X-None)] ; property atom
+		[4 (or time X-CurrentTime)]))
+	 (msg (X-Create-message ListOfFields)))
+    (X-Dpy-send xdpy msg)))
 
 ;;; Warping
 ;;;###autoload
 	  (accept-process-output (X-Dpy-proc xdpy) 1)))) ; XXX
 
     xevret))
+(put 'XIfEvent 'lisp-indent-function 1)
 
 ;;;###autoload
 (defun XCheckIfEvent-in-queue (queue predic)
   (XIfEvent xdpy predic t))
 
 ;;;###autoload
-(defun XCheckIfEvent-processing (xdpy predic &optional peek)
-  "Block until PREDIC matches, processing any not matched events.
-If matched event already in queue, return imediatly.
-If PEEK is non-nil, do not remove matching event from queue."
-  ;; Check if event already in queue
-  (let (xevret)
-    (X-Dpy-events-excursion xdpy
-      (while (not (X-Event-p (setq xevret (XCheckIfEvent xdpy predic peek))))
-       
-	;; No matching event in queue, wait for it processing any
-	;; incomming events.
-	(X-Dpy-process-events xdpy)
-
-	(unless (X-Dpy-evq xdpy)
-	  ;; Events queue is empty after events processing, wait a
-	  ;; little for incoming event.
-	  (sit-for 0)
-	  (accept-process-output (X-Dpy-proc xdpy) 1))
-	))
-    xevret))
-
+(defun XSyncEvents (xdpy)
+  "Syncronize events ready for XDPY."
+  (funcall (X-Dpy-parse-guess-dispatcher xdpy) xdpy))
+  
 ;;;###autoload
 (defun XSync (xdpy &optional discard)
   "Sync with server.
   (XGetInputFocus xdpy)
   (decf (X-Dpy-evq-protects xdpy))
 
-  (when discard
+  (if (not discard)
+      (XSyncEvents xdpy)
+
     (setf (X-Dpy-evq xdpy) nil)
     (setf (X-Dpy-evq-protects xdpy) 0)))
 
 
 ;;; X Events description.
 
+;;;###autoload(autoload 'X-Event-xkey-keycode "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-root "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-child "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-root-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-root-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-event-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-event-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-state "xlib-xr")
+;;;###autoload(autoload 'X-Event-xkey-same-screen "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xbutton-button "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-root "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-child "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-root-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-root-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-event-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-event-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-state "xlib-xr")
+;;;###autoload(autoload 'X-Event-xbutton-same-screen "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xmotion-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-root "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-child "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-root-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-root-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-event-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-event-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-state "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmotion-same-screen "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xcrossing-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-root "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-child "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-root-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-root-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-event-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-event-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-state "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-mode "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcrossing-same-screen-focus "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xfocus-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xfocus-mode "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xexpose-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xexpose-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xexpose-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xexpose-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xexpose-height "xlib-xr")
+;;;###autoload(autoload 'X-Event-xexpose-count "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-drawable "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-height "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-minor-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-count "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgraphicsexpose-major-event "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xnoexpose-drawable "xlib-xr")
+;;;###autoload(autoload 'X-Event-xnoexpose-minor-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xnoexpose-major-event "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xvisibility-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xvisibility-state "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xcreatewindow-parent "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-height "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-border-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcreatewindow-override "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xdestroywindow-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xdestroywindow-window "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xunmap-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xunmap-fromconfigure "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xmap-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmap-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmap-override "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xmaprequest-parent "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmaprequest-window "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xreparent-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xreparent-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xreparent-parent "xlib-xr")
+;;;###autoload(autoload 'X-Event-xreparent-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xreparent-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xreparent-override "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xconfigure-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-above-sibling "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-height "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-border-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigure-override-redirect "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xconfigurerequest-parent "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-sibling "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-y "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-height "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-border-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xconfigurerequest-value-mask "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xgravity-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgravity-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgravity-x "xlib-xr")
+;;;###autoload(autoload 'X-Event-xgravity-y "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xresizerequest-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xresizerequest-width "xlib-xr")
+;;;###autoload(autoload 'X-Event-xresizerequest-height "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xcirculate-event "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcirculate-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcirculate-parent "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcirculate-place "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xproperty-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xproperty-atom "xlib-xr")
+;;;###autoload(autoload 'X-Event-xproperty-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xproperty-state "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xselectionclear-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionclear-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionclear-atom "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xselectionrequest-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionrequest-owner "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionrequest-requestor "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionrequest-selection "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionrequest-target "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselectionrequest-property "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xselection-time "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselection-requestor "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselection-selection "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselection-target "xlib-xr")
+;;;###autoload(autoload 'X-Event-xselection-property "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xcolormap-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcolormap-colormap "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcolormap-new "xlib-xr")
+;;;###autoload(autoload 'X-Event-xcolormap-state "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xclient-window "xlib-xr")
+;;;###autoload(autoload 'X-Event-xclient-atom "xlib-xr")
+;;;###autoload(autoload 'X-Event-xclient-msg "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xmapping-request "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmapping-first-keycode "xlib-xr")
+;;;###autoload(autoload 'X-Event-xmapping-count "xlib-xr")
+
+;;;###autoload(autoload 'X-Event-xerror-code "xlib-xr")
+;;;###autoload(autoload 'X-Event-xerror-resourceid "xlib-xr")
+;;;###autoload(autoload 'X-Event-xerror-min-op "xlib-xr")
+;;;###autoload(autoload 'X-Event-xerror-maj-op "xlib-xr")
+
 ;; TODO:
 ;;   - Should be X-Dpy depended to support extensions derived events
 (X-Event-define X-KeyPress "xkey" (keycode nil time root event child root-x root-y event-x event-y state same-screen)
 
 	 (unwind-protect
 	     (when (zerop (1- (X-Dpy-evq-protects ,xdpy)))
-	       (X-Dpy-process-events ,xdpy))
+               (XSyncEvents ,xdpy))
 	   (decf (X-Dpy-evq-protects ,xdpy)))))))
 
 ;;;###autoload
 (put 'X-Dpy-events-excursion 'lisp-indent-function 1)
 (put 'X-Dpy-send-excursion 'lisp-indent-function 1)
 
+(defvar X-default-timeout 60
+  "This should be big enought, larger than any XEmacs blocking.")
+
 ;;; Reading and parsing
 (defun X-Dpy-grab-bytes (xdpy num &optional to-secs to-msecs)
   "On display XDPY, wait for at least NUM bytes and return string."
   (let (rstr)
     (while (< (length (X-Dpy-message-buffer xdpy)) num)
       (when (null (accept-process-output (X-Dpy-proc xdpy)
-                                         (or to-secs 5) (or to-msecs 0)))
+                                         (or to-secs X-default-timeout) (or to-msecs 0)))
 	;; Timeouted
 	(error "X: Timeout while reading from server.")))
 
 			     ;; with last request sequence, then end response
 			     ;; evaluating.
 			     (X-Dpy-log xdpy "Get ERROR seq: %d, rseq-id: %d\n" '(X-Event-seq (cdr xerr)) '(X-Dpy-rseq-id xdpy))
-			     (when (= (X-Event-seq (cdr xerr)) (X-Dpy-rseq-id xdpy))
+			     (when (= (X-Event-seq (cdr xerr)) (X-Dpy-reqseq xdpy))
 			       (throw 'processed (setq result nil)))))
 
 			  ;; Repeat processing XXX excluding t or nil
 
   ;; If no-one reading now, mean than error or event arrived.
   (when (zerop (X-Dpy-readings xdpy))
-     (while (> (length (X-Dpy-message-buffer xdpy)) 0)
-       (X-Dpy-eval-error-or-event xdpy)
+    (while (> (length (X-Dpy-message-buffer xdpy)) 0)
+      (X-Dpy-eval-error-or-event xdpy))
 
-       (when (zerop (X-Dpy-evq-protects xdpy))
-	 (X-Dpy-process-events xdpy))
-       )))
+    ;; Execute events
+    (when (zerop (X-Dpy-evq-protects xdpy))
+      (incf (X-Dpy-evq-protects xdpy))
+      (unwind-protect
+          (X-Dpy-process-events xdpy)
+        (decf (X-Dpy-evq-protects xdpy))))
+    ))
 
 
 (provide 'xlib-xr)

lisp/xlib-xwin.el

       (setq al (cdr al)))
     (car al)))
 
+;;;###autoload
+(defsubst X-Atom-equal (a1 a2)
+  "Return non-nil if two atoms A1 and A2 are equal."
+  (eq (and (X-Atom-p a1) (X-Atom-id a1))
+      (and (X-Atom-p a2) (X-Atom-id a2))))
+
 ;; Attributes operations
 ;;;###autoload
 (defstruct (X-Attr (:predicate X-Attr-isattr-p))
 	     (if (X-Cursor-p (X-Attr-cursor attr))
 		 (X-Cursor-id (X-Attr-cursor attr))
 	       (X-Attr-cursor attr))) . 4)
-	  (X-Attr-mapstate . 1))))
+	  )))
 
 ;;;###autoload
 (defun X-Attr-p (attr &optional sig)