free the event and don't use deprecated XCBSync function

SVN revision: 25760
This commit is contained in:
doursse 2006-09-12 07:48:44 +00:00 committed by doursse
parent 691df94e56
commit 369e8a9975
2 changed files with 12 additions and 8 deletions

View File

@ -295,13 +295,8 @@ main(int argc, char **argv)
if (ev->detail.id == 3)
{
setdown();
evas_free(evas);
free(e);
XCBDisconnect(conn);
evas_shutdown();
exit(0);
goto exit;
}
#if 0
if (!pause_me)
@ -361,6 +356,7 @@ main(int argc, char **argv)
usleep(100000);
}
exit:
setdown();
evas_free(evas);
XCBDisconnect(conn);

View File

@ -102,6 +102,7 @@ main(int argc, char **argv)
XCBConnection *conn;
const XCBQueryExtensionRep *rep_shm;
const XCBQueryExtensionRep *rep_xrender;
XCBGetInputFocusRep *reply;
XCBSCREEN *screen;
XCBDRAWABLE win;
XCBGenericEvent *e;
@ -154,7 +155,11 @@ main(int argc, char **argv)
XSetWMNormalHints(disp, win, &szhints);
#endif
XCBMapWindow (conn, win.window);
XCBSync(conn, 0);
/* we sync */
reply = XCBGetInputFocusReply(conn,
XCBGetInputFocusUnchecked(conn),
NULL);
free(reply);
/* test evas_free.... :) */
evas_init();
@ -187,7 +192,10 @@ main(int argc, char **argv)
XCBButtonPressEvent *ev = (XCBButtonPressEvent *)e;
if (ev->detail.id == 3)
goto exit;
{
free(e);
goto exit;
}
#if 0
if (!pause_me)
pause_me = 1;