Update of /cvsroot/freevo/kaa/display/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17947/src
Modified Files:
__init__.py x11display.c x11window.c
Log Message:
Use weakrefs for notifier connections in X11Display; fix double DECREF
problem in X11Window; update evas test to use key names.
Index: x11display.c
===================================================================
RCS file: /cvsroot/freevo/kaa/display/src/x11display.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** x11display.c 25 Jul 2005 16:41:53 -0000 1.12
--- x11display.c 29 Jul 2005 20:04:41 -0000 1.13
***************
*** 75,79 ****
X11Display_PyObject__dealloc(X11Display_PyObject * self)
{
! printf("X11Display dealloc\n");
if (self->display) {
XCloseDisplay(self->display);
--- 75,79 ----
X11Display_PyObject__dealloc(X11Display_PyObject * self)
{
! printf("X11Display dealloc: %x\n", self);
if (self->display) {
XCloseDisplay(self->display);
Index: x11window.c
===================================================================
RCS file: /cvsroot/freevo/kaa/display/src/x11window.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** x11window.c 25 Jul 2005 16:41:53 -0000 1.12
--- x11window.c 29 Jul 2005 20:04:42 -0000 1.13
***************
*** 65,74 ****
X11Window_PyObject__clear(X11Window_PyObject *self)
{
- PyObject *tmp;
- if (self->display_pyobject) {
- tmp = self->display_pyobject;
- self->display_pyobject = 0;
- Py_DECREF(tmp);
- }
return 0;
}
--- 65,68 ----
***************
*** 130,135 ****
X11Window_PyObject__dealloc(X11Window_PyObject * self)
{
if (self->window) {
- //printf("X11Window destroy\n");
XLockDisplay(self->display);
XDestroyWindow(self->display, self->window);
--- 124,129 ----
X11Window_PyObject__dealloc(X11Window_PyObject * self)
{
+ printf("X11Window dealloc\n");
if (self->window) {
XLockDisplay(self->display);
XDestroyWindow(self->display, self->window);
Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/kaa/display/src/__init__.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** __init__.py 25 Jul 2005 18:57:27 -0000 1.21
--- __init__.py 29 Jul 2005 20:04:41 -0000 1.22
***************
*** 103,112 ****
self._windows = {}
! dispatcher = kaa.notifier.SocketDispatcher(self.handle_events)
dispatcher.register(self.socket)
# Also connect to the idle signal. It is a bad hack, but when
# drawing is done, the socket is read and we will miss keypress
# events when doing drawings.
! kaa.notifier.signals['idle'].connect(self.handle_events)
def handle_events(self):
--- 103,112 ----
self._windows = {}
! dispatcher = kaa.notifier.WeakSocketDispatcher(self.handle_events)
dispatcher.register(self.socket)
# Also connect to the idle signal. It is a bad hack, but when
# drawing is done, the socket is read and we will miss keypress
# events when doing drawings.
! kaa.notifier.signals['idle'].connect_weak(self.handle_events)
def handle_events(self):
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog