forked from 12to11/12to11
Also initialize primary selection on startup
* xdata.c (SelectSelectionInput): If PRIMARY has an owner, notice it as well.
This commit is contained in:
parent
112c4d4fbe
commit
424ab2966f
1 changed files with 9 additions and 4 deletions
13
xdata.c
13
xdata.c
|
@ -1150,15 +1150,20 @@ SelectSelectionInput (Atom selection)
|
||||||
{
|
{
|
||||||
int mask;
|
int mask;
|
||||||
|
|
||||||
/* If SELECTION already exists, announce it as well. Use
|
/* If the selection already exists, announce it to Wayland clients
|
||||||
CurrentTime (even though the ICCCM says this is a bad idea); any
|
as well. Use CurrentTime (even though the ICCCM says this is a
|
||||||
XFixeSeslectionNotify event that arrives later will clear up our
|
bad idea); any XFixesSelectionNotify event that arrives later
|
||||||
(bad) view of the selection change time. */
|
will clear up our (incorrect) view of the selection change
|
||||||
|
time. */
|
||||||
|
|
||||||
if (selection == CLIPBOARD
|
if (selection == CLIPBOARD
|
||||||
&& XGetSelectionOwner (compositor.display, CLIPBOARD) != None)
|
&& XGetSelectionOwner (compositor.display, CLIPBOARD) != None)
|
||||||
NoticeClipboardChanged (CurrentTime);
|
NoticeClipboardChanged (CurrentTime);
|
||||||
|
|
||||||
|
if (selection == XA_PRIMARY
|
||||||
|
&& XGetSelectionOwner (compositor.display, XA_PRIMARY) != None)
|
||||||
|
NoticePrimaryChanged (CurrentTime);
|
||||||
|
|
||||||
mask = XFixesSetSelectionOwnerNotifyMask;
|
mask = XFixesSetSelectionOwnerNotifyMask;
|
||||||
mask |= XFixesSelectionWindowDestroyNotifyMask;
|
mask |= XFixesSelectionWindowDestroyNotifyMask;
|
||||||
mask |= XFixesSelectionClientCloseNotifyMask;
|
mask |= XFixesSelectionClientCloseNotifyMask;
|
||||||
|
|
Loading…
Add table
Reference in a new issue