From: Frantisek D. <va...@us...> - 2006-09-02 19:01:26
|
Update of /cvsroot/xine/xine-ui/src/xitk/xine-toolkit In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12271/src/xitk/xine-toolkit Modified Files: menu.c xitk.c Log Message: Fixed using window type property (fixes a bug #1534222), added preventive memsets. Index: menu.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/xine-toolkit/menu.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- menu.c 19 Jun 2006 13:56:50 -0000 1.25 +++ menu.c 2 Sep 2006 19:01:24 -0000 1.26 @@ -789,7 +789,7 @@ xwin = xitk_window_create_simple_window(private_data->imlibdata, x, y, wwidth + 2, wheight + 2); - xitk_set_wm_window_type(xitk_window_get_window(xwin), WINDOW_TYPE_DOCK); + xitk_set_wm_window_type(xitk_window_get_window(xwin), WINDOW_TYPE_MENU); if(bsep || btitle) { int width, height; Index: xitk.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/xine-toolkit/xitk.c,v retrieving revision 1.152 retrieving revision 1.153 diff -u -r1.152 -r1.153 --- xitk.c 1 Aug 2006 02:11:06 -0000 1.152 +++ xitk.c 2 Sep 2006 19:01:24 -0000 1.153 @@ -736,9 +736,10 @@ if(gXitk->wm_type & WM_TYPE_EWMH_COMP) { + XEvent xev; + + memset(&xev, 0, sizeof xev); if(gXitk->wm_type & WM_TYPE_KWIN) { - XEvent xev; - XLockDisplay(gXitk->display); xev.xclient.type = ClientMessage; xev.xclient.display = gXitk->display; @@ -755,8 +756,6 @@ XUnlockDisplay(gXitk->display); } else { - XEvent xev; - XLockDisplay(gXitk->display); xev.xclient.type = ClientMessage; @@ -824,6 +823,7 @@ return; } + memset(&xev, 0, sizeof xev); xev.type = ClientMessage; xev.xclient.type = ClientMessage; xev.xclient.window = window; @@ -846,6 +846,7 @@ if((window == None) || (atom == None)) return; + memset(&xev, 0, sizeof(xev)); xev.xclient.type = ClientMessage; xev.xclient.message_type = XA_NET_WM_STATE; xev.xclient.display = gXitk->display; @@ -912,22 +913,8 @@ } if(atom) { - XEvent xev; - - xev.xclient.type = ClientMessage; - xev.xclient.display = gXitk->display; - xev.xclient.window = window; - xev.xclient.message_type = XA_WIN_LAYER; - xev.xclient.format = 32; - xev.xclient.data.l[0] = *atom; - xev.xclient.data.l[1] = 0l; - xev.xclient.data.l[2] = 0l; - xev.xclient.data.l[3] = 0l; - xev.xclient.data.l[4] = 0l; - XLOCK(gXitk->display); - XSendEvent(gXitk->display, DefaultRootWindow(gXitk->display), False, SubstructureNotifyMask, &xev); - + XChangeProperty(gXitk->display, window, XA_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *)atom, 1); XRaiseWindow(gXitk->display, window); XUNLOCK(gXitk->display); } @@ -1987,7 +1974,8 @@ if(fx->window != None && fx->widget_list) { XEvent xexp; - + + memset(&xexp, 0, sizeof xexp); xexp.xany.type = Expose; xexp.xexpose.type = Expose; xexp.xexpose.send_event = True; |