From: Nils O. F. <ni...@no...> - 2007-01-04 23:01:12
|
Elmo, thanks for the reply Torsdag 04 januar 2007 16:03, skrev Elmo M=E4ntynen: > Nils Olav Fossum wrote: > > hi to all 11 of you :D > > ..but there is a bug in the window-handling code somewhere.. > > The windows dont register as they should do. > > > > in the __init__.py file, WM class, we have _addWin, _delWin and window > > I had to manipulate these to get the window registering working. > > See the attached patch. > > This is just a hack so I can go on testing pywm, but I hope someone can > > take a look at it to locate the real bug.. > > Just some more meat in case someone out there stumbles into the same: My change to WM._addWin are just a harmless check so new windows dont=20 get 'registered' twice. The WM._delWin change fixes a bug in releasing the window from=20 the 'WM.windows' dir. The real workaround is done in WM.window. The underlying problem is that WM.window is called=20 (from the code in flwm_.pyx ?) before WM._addWin 'registers' the new window. Here is a printout of wm1.py after the patch is innstalled: =2D------ wm.on_keyEvent: known key, launching func Oooopss, should not happen?? (window added anyway) **** Cheated to add window, it was not registrered with _addWin! **** WM.on_activate: activated 'rxvt' Whooha: window already exist !!! (skipped add) pWin: <window hWin:0x81cf890 'rxvt'> WM.on_create: created window 'rxvt' =2D----- Without the patch I get a exception error. BTW, wm1.py was the smallest app I could come up with to test this bug (and= =20 the one below).=20 > > > > So a question.. > > I use Xnest for testing pywm because a 7" 800x480 sized screen is less > > than comfortable to work on. > > > > When I start my pywm derivate (wm1.py), on a new Xnest with no > > applications, something goes wrong and I cant get my test Fl_Window to > > receive mouse click. Started like this: > > $ Xnest -ac -geometry 800x480 :22 & > > $ export DISPLAY=3D:22 > > $ ./wm1.py > > > > However when one application is running inside Xnest before I start > > wm1.py it works.. (Started like this): > > $ Xnest -ac -geometry 800x480 :22 & > > $ export DISPLAY=3D:22 > > $ xclock& > > $ ./wm1.py > > > > So , is this another bug, or is it something I dont do right..? > > Probably a bug. Can't tell, since I got too much on my hands at the momen= t. > Oki, I can live with a workaround while testing a bit more.=20 > You should consider using trying the darcs vcs. The tarball is a darcs > repo (a branch), with which you can work with (it works without a > central server, but I could set one up if deemed useful). Notice that > your patch has tabs in the last part. Also, you might want to take a > look at Leo, the editor (or ide) that the original author used. Because > of the learning curve (not that steep) associated with efficient usage, > I haven't used it much, but if you if like the style of workflow it > enables, it might nice. Thanks for the tips, Im looking into it. Sorry about the tabs in patch..=20 I will send a proper one if asked. > So, I haven't worked on pywm much, and can't at the moment, but I do > have plans concerning it. Among other things, I've considered rewriting > or adapting it to use the (hopefully) to be python interface to the new > x lib.=20 Great, I really hope theres a future for pywm! > But for now, do with it as you please. I'd be glad to hear from=20 > big improvements though, and if you continue to develop it, it would > nice of you to tell about them on the webpage. > > Elmo, the third (named) maintainer heh, dont expect too much from me. Im not a seasoned programmer :) pywm just seem to be a good tool for me to controll some applications in a= =20 touchscreen environment. I can navigate around in python code, but when it comes to C Im lost. Therefore I really hope theres no showstopper bugs in the underlying flwm=20 code. I will keep you posted while I continue to fumble with pywm. :) =20 |