X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fselect-msw.c;h=616f0d6b6f854fd65fe35abb753bc65dc826b00d;hb=9cc68db575eb65d7a70b34ae1f6ef1eb4b62f756;hp=2e4a1276d11de40fa93856f4151045c73faf74f1;hpb=113b194be934327de99a168d809271db252c07c4;p=chise%2Fxemacs-chise.git diff --git a/src/select-msw.c b/src/select-msw.c index 2e4a127..616f0d6 100644 --- a/src/select-msw.c +++ b/src/select-msw.c @@ -101,7 +101,10 @@ mswindows_own_selection (Lisp_Object selection_name, Lisp_Object selection_value Lisp_Object converted_value = get_local_selection (selection_name, QSTRING); if (!NILP (converted_value) && CONSP (converted_value) && - EQ (XCAR (converted_value), QSTRING)) + EQ (XCAR (converted_value), QSTRING) && + /* pure mswindows behaviour only says we can own the selection + if it is the clipboard */ + EQ (selection_name, QCLIPBOARD)) Fmswindows_set_clipboard (XCDR (converted_value)); return Qnil; @@ -162,7 +165,10 @@ Return the contents of the mswindows clipboard. static Lisp_Object mswindows_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type) { - return Fmswindows_get_clipboard (); + if (EQ (selection_symbol, QCLIPBOARD)) + return Fmswindows_get_clipboard (); + else + return Qnil; } DEFUN ("mswindows-selection-exists-p", Fmswindows_selection_exists_p, 0, 0, 0, /* @@ -184,7 +190,8 @@ Remove the current MS-Windows selection from the clipboard. static void mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval) { - Fmswindows_delete_selection (); + if (EQ (selection, QCLIPBOARD)) + Fmswindows_delete_selection (); }