aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xselect.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xselect.c b/src/xselect.c
index bb052ae1ccf..ca756646cd0 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1679,12 +1679,18 @@ and t is the same as `SECONDARY'.)")
1679 Lisp_Object selection; 1679 Lisp_Object selection;
1680{ 1680{
1681 Window owner; 1681 Window owner;
1682 Atom atom;
1682 Display *dpy = x_current_display; 1683 Display *dpy = x_current_display;
1683 CHECK_SYMBOL (selection, 0); 1684 CHECK_SYMBOL (selection, 0);
1684 if (!NILP (Fx_selection_owner_p (selection))) 1685 if (!NILP (Fx_selection_owner_p (selection)))
1685 return Qt; 1686 return Qt;
1687 if (EQ (selection, Qnil)) selection = QPRIMARY;
1688 if (EQ (selection, Qt)) selection = QSECONDARY;
1689 atom = symbol_to_x_atom (dpy, selection);
1690 if (atom == 0)
1691 return Qnil;
1686 BLOCK_INPUT; 1692 BLOCK_INPUT;
1687 owner = XGetSelectionOwner (dpy, symbol_to_x_atom (dpy, selection)); 1693 owner = XGetSelectionOwner (dpy, atom);
1688 UNBLOCK_INPUT; 1694 UNBLOCK_INPUT;
1689 return (owner ? Qt : Qnil); 1695 return (owner ? Qt : Qnil);
1690} 1696}