Exemple #1
0
/* Procedure that Docks the icon */
static void
DockIcon(ClientData clientData)
{

	Window parent;
	unsigned int ret, atom;
	TrayIcon *icon= clientData;
	char* wm_name;

    Tk_MakeWindowExist(icon->win);

	Tk_SetWindowBackgroundPixmap(icon->win, ParentRelative);

	xembed_set_info(icon->win,XEMBED_MAPPED);

	atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", False );
	send_message(display, _GetSystemTray (), atom,
			SYSTEM_TRAY_REQUEST_DOCK,Tk_WindowId(icon->win),0,0);
}
Exemple #2
0
static PyObject *
tkwin_SetBackground(TkWinObject * self, PyObject * args)
{
    PyObject * bgobject;

    if (!PyArg_ParseTuple(args, "O", &bgobject))
	return NULL;

    if (PyInt_Check(bgobject))
	Tk_SetWindowBackground(self->tkwin, PyInt_AsLong(bgobject));
    else if (PaxPixmap_Check(bgobject))
	Tk_SetWindowBackgroundPixmap(self->tkwin,
				     PaxPixmap_AsPixmap(bgobject));
    else
	return PyErr_Format(PyExc_TypeError,
			    "argument must be integer or pixmap");

    Py_INCREF(Py_None);
    return Py_None;
}