mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
more dnd changes
window cycling stuff finnish pot files
This commit is contained in:
41
src/xutil.c
41
src/xutil.c
@@ -193,44 +193,3 @@ FormatXError(Display *dpy, XErrorEvent *error, char *buffer, int size)
|
||||
sprintf(buffer, " Error serial: %li\n", error->serial);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* GetSelection--
|
||||
* Request for the current primary selection.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
RequestSelection(Display *dpy, Window requestor, Time timestamp)
|
||||
{
|
||||
if (!Clipboard)
|
||||
Clipboard = XInternAtom(dpy, "CLIPBOARD", False);
|
||||
|
||||
XConvertSelection(dpy, XA_PRIMARY, XA_STRING, Clipboard, requestor,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
GetSelection(Display *dpy, Window requestor)
|
||||
{
|
||||
Atom rtype;
|
||||
int bits;
|
||||
unsigned long len, bytes;
|
||||
unsigned char *data;
|
||||
|
||||
XGetWindowProperty(dpy, requestor, Clipboard,
|
||||
0, MAXLINE/4, False, XA_STRING,
|
||||
&rtype, &bits, &len, &bytes, &data);
|
||||
if ((rtype!=XA_STRING) || (bits!=8)) {
|
||||
wwarning(_("invalid data in selection"));
|
||||
if (data) XFree(data);
|
||||
return NULL;
|
||||
} else {
|
||||
return (char*)data;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user