VirtualBox

Changeset 8951 in vbox for trunk


Ignore:
Timestamp:
May 20, 2008 12:31:51 PM (17 years ago)
Author:
vboxsync
Message:

HostServices/SharedClipboard and Additions/x11: support middle-button pasting (but not copying) in X11 guests and hosts

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/xclient/clipboard.cpp

    r8155 r8951  
    9393    /** X11 atom refering to the clipboard: CLIPBOARD */
    9494    Atom atomClipboard;
     95    /** X11 atom refering to the selection: PRIMARY */
     96    Atom atomPrimary;
    9597    /** X11 atom refering to the clipboard: TARGETS */
    9698    Atom atomTargets;
     
    11271129
    11281130    LogFlowFunc(("\n"));
    1129     if (*atomSelection != g_ctx.atomClipboard)
     1131    if (   (*atomSelection != g_ctx.atomClipboard)
     1132        && (*atomSelection != g_ctx.atomPrimary)
     1133       )
    11301134    {
    11311135        LogFlowFunc(("rc = false\n"));
     
    12171221        g_ctx.eOwner = GUEST;
    12181222    }
     1223    XtOwnSelection(g_ctx.widget, g_ctx.atomPrimary, CurrentTime, vboxClipboardConvertProc,
     1224                   NULL, 0);
    12191225    LogFlowFunc(("returning\n"));
    12201226}
     
    14301436    /* Get hold of the atoms which we need */
    14311437    g_ctx.atomClipboard = XInternAtom(XtDisplay(g_ctx.widget), "CLIPBOARD", false /* only_if_exists */);
     1438    g_ctx.atomPrimary   = XInternAtom(XtDisplay(g_ctx.widget), "PRIMARY",   false);
    14321439    g_ctx.atomTargets   = XInternAtom(XtDisplay(g_ctx.widget), "TARGETS",   false);
    14331440    g_ctx.atomMultiple  = XInternAtom(XtDisplay(g_ctx.widget), "MULTIPLE",  false);
  • trunk/src/VBox/HostServices/SharedClipboard/x11.cpp

    r8155 r8951  
    9797    /** X11 atom refering to the clipboard: CLIPBOARD */
    9898    Atom atomClipboard;
     99    /** X11 atom refering to the selection: PRIMARY */
     100    Atom atomPrimary;
    99101    /** X11 atom refering to the clipboard targets: TARGETS */
    100102    Atom atomTargets;
     
    724726    /* Get hold of the atoms which we need */
    725727    g_ctx.atomClipboard = XInternAtom(XtDisplay(g_ctx.widget), "CLIPBOARD", false /* only_if_exists */);
     728    g_ctx.atomPrimary   = XInternAtom(XtDisplay(g_ctx.widget), "PRIMARY",   false);
    726729    g_ctx.atomTargets   = XInternAtom(XtDisplay(g_ctx.widget), "TARGETS",   false);
    727730    g_ctx.atomMultiple  = XInternAtom(XtDisplay(g_ctx.widget), "MULTIPLE",  false);
     
    12301233
    12311234    LogFlowFunc(("\n"));
    1232     if (*atomSelection != g_ctx.atomClipboard)
     1235    if (   (*atomSelection != g_ctx.atomClipboard)
     1236        && (*atomSelection != g_ctx.atomPrimary)
     1237       )
    12331238    {
    12341239        LogFlowFunc(("rc = false\n"));
     
    13271332        g_ctx.eOwner = HOST;
    13281333    }
     1334    XtOwnSelection(g_ctx.widget, g_ctx.atomPrimary, CurrentTime, vboxClipboardConvertProc,
     1335                   NULL, 0);
    13291336    LogFlowFunc(("returning\n"));
    13301337
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette