summaryrefslogtreecommitdiff
path: root/lisp/x-dnd.el
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2005-02-05 16:53:22 +0000
committerJan Djärv <jan.h.d@swipnet.se>2005-02-05 16:53:22 +0000
commit18daafed96173ce66b171845b68cdff7ed671c90 (patch)
tree60c4c10468710c09d8b1c259d60af63a745d273a /lisp/x-dnd.el
parent31f16913d78ccf89e278816ba2c10ed075c1be19 (diff)
downloademacs-18daafed96173ce66b171845b68cdff7ed671c90.tar.gz
* x-dnd.el (x-dnd-handle-xdnd): Handle the case where the flags
isn't a cons (i.e. the version is 0).
Diffstat (limited to 'lisp/x-dnd.el')
-rw-r--r--lisp/x-dnd.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index f2b081fdcc5..a540c1b7af3 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -557,18 +557,20 @@ EVENT is the client message. FRAME is where the mouse is now.
WINDOW is the window within FRAME where the mouse is now.
FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent."
(cond ((equal "XdndEnter" message)
- (let ((version (ash (car (aref data 1)) -8))
- (more-than-3 (cdr (aref data 1)))
- (dnd-source (aref data 0)))
- (x-dnd-save-state
- window nil nil
- (if (> more-than-3 0)
- (x-window-property "XdndTypeList"
- frame "AnyPropertyType"
- dnd-source nil t)
- (vector (x-get-atom-name (aref data 2))
- (x-get-atom-name (aref data 3))
- (x-get-atom-name (aref data 4)))))))
+ (let* ((flags (aref data 1))
+ (version (and (consp flags) (ash (car flags) -8)))
+ (more-than-3 (and (consp flags) (cdr flags)))
+ (dnd-source (aref data 0)))
+ (if version ;; If flags is bad, version will be nil.
+ (x-dnd-save-state
+ window nil nil
+ (if (> more-than-3 0)
+ (x-window-property "XdndTypeList"
+ frame "AnyPropertyType"
+ dnd-source nil t)
+ (vector (x-get-atom-name (aref data 2))
+ (x-get-atom-name (aref data 3))
+ (x-get-atom-name (aref data 4))))))))
((equal "XdndPosition" message)
(let* ((x (car (aref data 2)))