Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 clipboard incr proto #12357

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7ef6152
code format
viordash Jul 23, 2023
5ffb53e
X11Clipboard.OnEvent code refactoring
viordash Jul 23, 2023
341984f
fix potential memleak. (XGetWindowProperty always allocates one extra…
viordash Jul 23, 2023
94225f2
no need to call XGetWindowProperty for an empty property
viordash Jul 23, 2023
7a85d21
X11Clipboard. handle PropertyNotify events
viordash Jul 23, 2023
8d86c4f
X11Clipboard. implement receive INCR data
viordash Jul 23, 2023
41e5ff1
X11Clipboard. unify the process of changing properties (text and bina…
viordash Jul 23, 2023
de6cc22
wip. X11Clipboard. implement transmit INCR data
viordash Jul 24, 2023
5dcacd7
X11Clipboard. get MaxRequestSize from X11
viordash Jul 25, 2023
46faae7
Clipboard X11. wait for the data to be stored
viordash Jul 25, 2023
09f1d6c
Revert "X11Clipboard. get MaxRequestSize from X11"
viordash Jul 25, 2023
4058759
X11Clipboard. for big data don't use CLIPBOARD_MANAGER
viordash Jul 25, 2023
0f89be8
X11Clipboard. fix waiting for INCR store to complete
viordash Jul 26, 2023
8e5f7db
X11Clipboard. fix UseIncrProtocol
viordash Jul 26, 2023
decd3a6
X11Clipboard. INCR for foreign windows only
viordash Jul 26, 2023
edfac01
use byte array
viordash Jul 27, 2023
0c9946e
X11Clipboard. support parallel INCR reading
viordash Jul 29, 2023
bbfbe50
X11Clipboard. support parallel INCR writing
viordash Jul 29, 2023
a977d3d
Merge remote-tracking branch 'origin/master' into x11-clipboard-incr-…
viordash Jul 29, 2023
8c41a77
X11Clipboard. fix ClearAsync completion
viordash Jul 29, 2023
6670284
Merge branch 'master' into x11-clipboard-incr-proto
viordash Jul 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
X11Clipboard. INCR for foreign windows only
  • Loading branch information
viordash committed Jul 27, 2023
commit decd3a6aa993cbabeead0a188f6ca61bdc489abe
4 changes: 2 additions & 2 deletions src/Avalonia.X11/X11Clipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private unsafe void OnEvent(ref XEvent ev)

private void OnIncrWritePropertyEvent(ref XEvent ev)
{
if (ev.type == XEventName.PropertyNotify && (PropertyState)ev.PropertyEvent.state == PropertyState.Delete && ev.PropertyEvent.atom == _incrWriteTargetAtom)
if (ev.type == XEventName.PropertyNotify && (PropertyState)ev.PropertyEvent.state == PropertyState.Delete)
{
if (_incrWriteData?.Length > 0)
{
Expand Down Expand Up @@ -277,7 +277,7 @@ private unsafe IntPtr WriteTargetToProperty(IntPtr target, IntPtr window, IntPtr
return IntPtr.Zero;
}

if (bytes.Length > MaxRequestSize)
if (bytes.Length > MaxRequestSize && window != _handle)
{
_incrWriteTargetAtom = target;
_incrWriteWindow = window;
Expand Down