Mercurial > mplayer.hg
annotate Gui/wm/wsxdnd.c @ 7016:44ce5a673be2
added gettimeofday-based profiling/timing
little speedup of outline()
author | arpi |
---|---|
date | Thu, 15 Aug 2002 20:50:13 +0000 |
parents | 7242f1840f8d |
children | 8e9607c5897e |
rev | line source |
---|---|
6967
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
1 /* Took WindowMaker implementation and adopted for MPlayer */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
2 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
3 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
4 #include <X11/Xlib.h> |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
5 #include "ws.h" |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
6 #include "wsxdnd.h" |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
7 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
8 #include <stdlib.h> |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
9 #include <string.h> |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
10 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
11 #include <X11/Xatom.h> |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
12 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
13 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
14 #define XDND_VERSION 3L |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
15 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
16 Atom _XA_XdndAware; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
17 Atom _XA_XdndEnter; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
18 Atom _XA_XdndLeave; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
19 Atom _XA_XdndDrop; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
20 Atom _XA_XdndPosition; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
21 Atom _XA_XdndStatus; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
22 Atom _XA_XdndActionCopy; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
23 Atom _XA_XdndSelection; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
24 Atom _XA_XdndFinished; |
6977
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
25 Atom _XA_XdndTypeList; |
6967
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
26 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
27 Atom atom_support; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
28 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
29 void wsXDNDInitialize() |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
30 { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
31 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
32 _XA_XdndAware = XInternAtom(wsDisplay, "XdndAware", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
33 _XA_XdndEnter = XInternAtom(wsDisplay, "XdndEnter", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
34 _XA_XdndLeave = XInternAtom(wsDisplay, "XdndLeave", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
35 _XA_XdndDrop = XInternAtom(wsDisplay, "XdndDrop", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
36 _XA_XdndPosition = XInternAtom(wsDisplay, "XdndPosition", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
37 _XA_XdndStatus = XInternAtom(wsDisplay, "XdndStatus", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
38 _XA_XdndActionCopy = XInternAtom(wsDisplay, "XdndActionCopy", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
39 _XA_XdndSelection = XInternAtom(wsDisplay, "XdndSelection", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
40 _XA_XdndFinished = XInternAtom(wsDisplay, "XdndFinished", False); |
6977
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
41 _XA_XdndTypeList = XInternAtom(wsDisplay, "XdndTypeList", False); |
6967
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
42 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
43 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
44 void wsXDNDMakeAwareness(wsTWindow* window) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
45 long int xdnd_version = XDND_VERSION; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
46 XChangeProperty (wsDisplay, window->WindowID, _XA_XdndAware, XA_ATOM, |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
47 32, PropModeAppend, (char *)&xdnd_version, 1); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
48 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
49 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
50 void wsXDNDClearAwareness(wsTWindow* window) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
51 XDeleteProperty (wsDisplay, window->WindowID, _XA_XdndAware); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
52 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
53 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
54 #define MAX_DND_FILES 64 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
55 Bool |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
56 wsXDNDProcessSelection(wsTWindow* wnd, XEvent *event) |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
57 { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
58 Atom ret_type; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
59 int ret_format; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
60 unsigned long ret_items; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
61 unsigned long remain_byte; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
62 char * delme; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
63 XEvent xevent; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
64 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
65 Window selowner = XGetSelectionOwner(wsDisplay,_XA_XdndSelection); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
66 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
67 XGetWindowProperty(wsDisplay, event->xselection.requestor, |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
68 event->xselection.property, |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
69 0, 65536, True, atom_support, &ret_type, &ret_format, |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
70 &ret_items, &remain_byte, (unsigned char **)&delme); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
71 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
72 /*send finished*/ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
73 memset (&xevent, 0, sizeof(xevent)); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
74 xevent.xany.type = ClientMessage; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
75 xevent.xany.display = wsDisplay; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
76 xevent.xclient.window = selowner; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
77 xevent.xclient.message_type = _XA_XdndFinished; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
78 xevent.xclient.format = 32; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
79 XDND_FINISHED_TARGET_WIN(&xevent) = wnd->WindowID; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
80 XSendEvent(wsDisplay, selowner, 0, 0, &xevent); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
81 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
82 if (!delme){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
83 printf("D&D: Nothing returned!\n"); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
84 return False; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
85 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
86 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
87 { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
88 /* Handle dropped files */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
89 char * retain = delme; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
90 char * files[MAX_DND_FILES]; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
91 int num = 0; |
6977
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
92 |
6967
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
93 while(retain < delme + ret_items) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
94 if (!strncmp(retain,"file:",5)) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
95 /* add more 2 chars while removing 5 is harmless */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
96 retain+=5; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
97 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
98 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
99 /* add the "retain" to the list */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
100 files[num++]=retain; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
101 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
102 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
103 /* now check for special characters */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
104 { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
105 int newone = 0; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
106 while(retain < (delme + ret_items)){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
107 if(*retain == '\r' || *retain == '\n'){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
108 *retain=0; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
109 newone = 1; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
110 } else { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
111 if (newone) |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
112 break; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
113 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
114 retain++; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
115 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
116 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
117 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
118 if (num >= MAX_DND_FILES) |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
119 break; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
120 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
121 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
122 /* Handle the files */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
123 if(wnd->DandDHandler){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
124 wnd->DandDHandler(num,files); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
125 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
126 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
127 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
128 free(delme); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
129 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
130 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
131 Bool |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
132 wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event) |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
133 { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
134 /* test */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
135 /*{ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
136 char * name = XGetAtomName(wsDisplay, event->message_type); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
137 printf("Got %s\n",name); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
138 XFree(name); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
139 }*/ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
140 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
141 if (event->message_type == _XA_XdndEnter) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
142 Atom ok = XInternAtom(wsDisplay, "text/uri-list", False); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
143 atom_support = None; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
144 if ((event->data.l[1] & 1) == 0){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
145 int index; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
146 for(index = 0; index <= 2 ; index++){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
147 if (event->data.l[2+index] == ok) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
148 atom_support = ok; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
149 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
150 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
151 if (atom_support == None) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
152 printf("This doesn't seem as a file...\n"); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
153 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
154 } else { |
6977
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
155 /* need to check the whole list here */ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
156 int ret_left = 1; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
157 int offset = 0; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
158 Atom* ret_buff; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
159 int ret_type,ret_format,ret_items; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
160 /* while there is data left...*/ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
161 while(ret_left){ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
162 XGetWindowProperty(wsDisplay,event->data.l[0],_XA_XdndTypeList, |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
163 offset,256,False,XA_ATOM,&ret_type, |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
164 &ret_format,&ret_items,&ret_left, |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
165 (unsigned char**)&ret_buff); |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
166 |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
167 /* sanity checks...*/ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
168 if(ret_buff == NULL || ret_type != XA_ATOM || ret_format != 8*sizeof(Atom)){ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
169 XFree(ret_buff); |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
170 break; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
171 } |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
172 /* now chek what we've got */ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
173 { |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
174 int i; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
175 for(i=0; i<ret_items; i++){ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
176 if(ret_buff[i] == ok){ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
177 atom_support = ok; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
178 break; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
179 } |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
180 } |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
181 /* found it ! */ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
182 if (atom_support != None) |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
183 break; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
184 } |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
185 /* maybe next time ... */ |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
186 XFree(ret_buff); |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
187 offset += 256; |
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
188 } |
6967
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
189 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
190 return True; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
191 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
192 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
193 if (event->message_type == _XA_XdndLeave) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
194 return True; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
195 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
196 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
197 if (event->message_type == _XA_XdndDrop) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
198 if (event->data.l[0] != XGetSelectionOwner(wsDisplay, _XA_XdndSelection)){ |
6977
7242f1840f8d
kde3 dnd fix from Gregory Kovriga and file name handling fix in dnd callback
pontscho
parents:
6967
diff
changeset
|
199 puts("Wierd selection owner... QT?"); |
6967
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
200 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
201 if (atom_support != None) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
202 XConvertSelection(wsDisplay, _XA_XdndSelection, atom_support, |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
203 _XA_XdndSelection, event->window, |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
204 CurrentTime); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
205 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
206 return True; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
207 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
208 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
209 if (event->message_type == _XA_XdndPosition) { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
210 Window srcwin = event->data.l[0]; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
211 if (atom_support == None){ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
212 return True; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
213 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
214 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
215 /* send response */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
216 { |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
217 XEvent xevent; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
218 memset (&xevent, 0, sizeof(xevent)); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
219 xevent.xany.type = ClientMessage; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
220 xevent.xany.display = wsDisplay; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
221 xevent.xclient.window = srcwin; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
222 xevent.xclient.message_type = _XA_XdndStatus; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
223 xevent.xclient.format = 32; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
224 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
225 XDND_STATUS_TARGET_WIN (&xevent) = event->window; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
226 XDND_STATUS_WILL_ACCEPT_SET (&xevent, True); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
227 XDND_STATUS_WANT_POSITION_SET(&xevent, True); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
228 /* actually need smth real here */ |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
229 XDND_STATUS_RECT_SET(&xevent, 0, 0, 1024,768); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
230 XDND_STATUS_ACTION(&xevent) = _XA_XdndActionCopy; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
231 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
232 XSendEvent(wsDisplay, srcwin, 0, 0, &xevent); |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
233 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
234 return True; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
235 } |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
236 |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
237 return False; |
0fa27966ac47
add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents:
diff
changeset
|
238 } |