python: Add wmfs_uicb python function

This commit is contained in:
Martin Duquesnoy
2009-01-04 19:46:15 +01:00
parent 1189fe1690
commit b2eb9ee33e
3 changed files with 34 additions and 5 deletions

View File

@@ -174,7 +174,7 @@ clientmessageevent(XClientMessageEvent *ev)
{
uchar *ret_func = NULL;
uchar *ret_cmd = NULL;
char *cmd;
char *cmd = NULL;
if(XGetWindowProperty(dpy, ROOT, net_atom[wmfs_function], 0, 4096,
False, net_atom[utf8_string], &rt, &rf, &ir, &il, &ret_func) == Success)
@@ -183,15 +183,16 @@ clientmessageevent(XClientMessageEvent *ev)
if(XGetWindowProperty(dpy, ROOT, net_atom[wmfs_cmd], 0, 4096,
False, net_atom[utf8_string], &rt, &rf, &ir, &il, &ret_cmd) == Success)
printf("%s\n", ret_cmd);
/*
if(strcmp((char*)ret_cmd, "NULL") == 0)
cmd = NULL;
else
strcpy(cmd, (char*)ret_cmd);
else
if(ret_cmd != NULL)
strcpy(cmd, (char*)ret_cmd)*/
void (*func)(uicb_t) = name_to_func((char*)ret_func, func_list);
func(cmd);
func((uicb_t)ret_cmd);
if(ret_cmd)
XFree(ret_cmd);