Mercurial > mplayer.hg
comparison gui/wm/wsxdnd.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | b0a7b35b78d2 |
children | 9198f711233e |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
136 } | 136 } |
137 | 137 |
138 if (num >= MAX_DND_FILES) | 138 if (num >= MAX_DND_FILES) |
139 break; | 139 break; |
140 } | 140 } |
141 | 141 |
142 /* Handle the files */ | 142 /* Handle the files */ |
143 if(wnd->DandDHandler){ | 143 if(wnd->DandDHandler){ |
144 wnd->DandDHandler(num,files); | 144 wnd->DandDHandler(num,files); |
145 } | 145 } |
146 } | 146 } |
185 while(ret_left && atom_support == None){ | 185 while(ret_left && atom_support == None){ |
186 XGetWindowProperty(wsDisplay,event->data.l[0],XA_XdndTypeList, | 186 XGetWindowProperty(wsDisplay,event->data.l[0],XA_XdndTypeList, |
187 offset,256,False,XA_ATOM,&ret_type, | 187 offset,256,False,XA_ATOM,&ret_type, |
188 &ret_format,&ret_items,&ret_left, | 188 &ret_format,&ret_items,&ret_left, |
189 (unsigned char**)&ret_buff); | 189 (unsigned char**)&ret_buff); |
190 | 190 |
191 /* sanity checks...*/ | 191 /* sanity checks...*/ |
192 if(ret_buff == NULL || ret_type != XA_ATOM || ret_format != 8*sizeof(Atom)){ | 192 if(ret_buff == NULL || ret_type != XA_ATOM || ret_format != 8*sizeof(Atom)){ |
193 XFree(ret_buff); | 193 XFree(ret_buff); |
194 break; | 194 break; |
195 } | 195 } |
208 offset += 256; | 208 offset += 256; |
209 } | 209 } |
210 } | 210 } |
211 return True; | 211 return True; |
212 } | 212 } |
213 | 213 |
214 if (event->message_type == XA_XdndLeave) { | 214 if (event->message_type == XA_XdndLeave) { |
215 return True; | 215 return True; |
216 } | 216 } |
217 | 217 |
218 if (event->message_type == XA_XdndDrop) { | 218 if (event->message_type == XA_XdndDrop) { |
219 if (event->data.l[0] != XGetSelectionOwner(wsDisplay, XA_XdndSelection)){ | 219 if (event->data.l[0] != XGetSelectionOwner(wsDisplay, XA_XdndSelection)){ |
220 puts("Wierd selection owner... QT?"); | 220 puts("Wierd selection owner... QT?"); |
221 } | 221 } |
222 if (atom_support != None) { | 222 if (atom_support != None) { |
224 XA_XdndSelection, event->window, | 224 XA_XdndSelection, event->window, |
225 CurrentTime); | 225 CurrentTime); |
226 } | 226 } |
227 return True; | 227 return True; |
228 } | 228 } |
229 | 229 |
230 if (event->message_type == XA_XdndPosition) { | 230 if (event->message_type == XA_XdndPosition) { |
231 Window srcwin = event->data.l[0]; | 231 Window srcwin = event->data.l[0]; |
232 if (atom_support == None){ | 232 if (atom_support == None){ |
233 return True; | 233 return True; |
234 } | 234 } |
239 memset (&xevent, 0, sizeof(xevent)); | 239 memset (&xevent, 0, sizeof(xevent)); |
240 xevent.xany.type = ClientMessage; | 240 xevent.xany.type = ClientMessage; |
241 xevent.xany.display = wsDisplay; | 241 xevent.xany.display = wsDisplay; |
242 xevent.xclient.window = srcwin; | 242 xevent.xclient.window = srcwin; |
243 xevent.xclient.message_type = XA_XdndStatus; | 243 xevent.xclient.message_type = XA_XdndStatus; |
244 xevent.xclient.format = 32; | 244 xevent.xclient.format = 32; |
245 | 245 |
246 XDND_STATUS_TARGET_WIN (&xevent) = event->window; | 246 XDND_STATUS_TARGET_WIN (&xevent) = event->window; |
247 XDND_STATUS_WILL_ACCEPT_SET (&xevent, True); | 247 XDND_STATUS_WILL_ACCEPT_SET (&xevent, True); |
248 XDND_STATUS_WANT_POSITION_SET(&xevent, True); | 248 XDND_STATUS_WANT_POSITION_SET(&xevent, True); |
249 /* actually need smth real here */ | 249 /* actually need smth real here */ |
250 XDND_STATUS_RECT_SET(&xevent, 0, 0, 1024,768); | 250 XDND_STATUS_RECT_SET(&xevent, 0, 0, 1024,768); |
251 XDND_STATUS_ACTION(&xevent) = XA_XdndActionCopy; | 251 XDND_STATUS_ACTION(&xevent) = XA_XdndActionCopy; |
252 | 252 |
253 XSendEvent(wsDisplay, srcwin, 0, 0, &xevent); | 253 XSendEvent(wsDisplay, srcwin, 0, 0, &xevent); |
254 } | 254 } |
255 return True; | 255 return True; |
256 } | 256 } |
257 | 257 |
258 return False; | 258 return False; |
259 } | 259 } |