Enlightenment CVS committal Author : xcomputerman Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: ecore_x.c ecore_x_dnd.c ecore_x_selection.c Log Message: Flesh out a little more Xdnd code =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -3 -r1.46 -r1.47 --- ecore_x.c 23 Oct 2004 02:19:19 -0000 1.46 +++ ecore_x.c 24 Oct 2004 03:58:10 -0000 1.47 @@ -400,7 +400,7 @@ _ecore_x_atom_selection_prop_primary = XInternAtom(_ecore_x_disp, "_ECORE_SELECTION_PRIMARY", False); _ecore_x_atom_selection_prop_secondary = XInternAtom(_ecore_x_disp, "_ECORE_SELECTION_SECONDARY", False); _ecore_x_atom_selection_prop_clipboard = XInternAtom(_ecore_x_disp, "_ECORE_SELECTION_CLIPBOARD", False); - _ecore_x_atom_selection_prop_xdnd = XInternAtom(_ecore_x_disp, "_ECORE_SELECTION_XDND", False); + _ecore_x_atom_selection_prop_xdnd = XInternAtom(_ecore_x_disp, "JXSelectionWindowProperty", False); _ecore_x_atom_selection_xdnd = XInternAtom(_ecore_x_disp, "XdndSelection", False); _ecore_x_atom_xdnd_aware = XInternAtom(_ecore_x_disp, "XdndAware", False); _ecore_x_atom_xdnd_type_list = XInternAtom(_ecore_x_disp, "XdndTypeList", False); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_dnd.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ecore_x_dnd.c 23 Apr 2004 22:17:00 -0000 1.7 +++ ecore_x_dnd.c 24 Oct 2004 03:58:11 -0000 1.8 @@ -203,7 +203,7 @@ xev.xclient.message_type = _ecore_x_atom_xdnd_position; xev.xclient.data.l[0] = _xdnd->source; xev.xclient.data.l[1] = 0; /* Reserved */ - xev.xclient.data.l[2] = ((x << 16) & 0xffff0000) | (y * 0xffff); + xev.xclient.data.l[2] = ((x << 16) & 0xffff0000) | (y & 0xffff); xev.xclient.data.l[3] = CurrentTime; /* Version 1 */ xev.xclient.data.l[4] = _xdnd->action; /* Version 2, Needs to be pre-set */ XSendEvent(_ecore_x_disp, win, False, 0, &xev); @@ -241,4 +241,26 @@ _xdnd->dest = win; } +void +_ecore_x_dnd_send_finished(void) +{ + XEvent xev; + + xev.xany.type = ClientMessage; + xev.xany.display = _ecore_x_disp; + xev.xclient.window = _xdnd->source; + xev.xclient.message_type = _ecore_x_atom_xdnd_finished; + xev.xclient.format = 32; + + xev.xclient.data.l[0] = _xdnd->dest; + memset(xev.xclient.data.l + 1, 0, sizeof(long) * 3); + XSendEvent(_ecore_x_disp, _xdnd->source, False, 0, &xev); +} + +int +_ecore_x_dnd_own_selection(void) +{ + return (!XSetSelectionOwner(_ecore_x_disp, _ecore_x_atom_selection_xdnd, + _xdnd->source, CurrentTime)); +} =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_selection.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ecore_x_selection.c 20 Feb 2004 07:06:29 -0000 1.14 +++ ecore_x_selection.c 24 Oct 2004 03:58:11 -0000 1.15 @@ -325,6 +325,8 @@ prop = _ecore_x_atom_selection_prop_primary; else if (selection == _ecore_x_atom_selection_secondary) prop = _ecore_x_atom_selection_prop_secondary; + else if (selection == _ecore_x_atom_selection_xdnd) + prop = _ecore_x_atom_selection_prop_xdnd; else prop = _ecore_x_atom_selection_prop_clipboard; @@ -523,3 +525,4 @@ } } + ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs