Status: Open
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 43 by mefisk: wimpiggy: overflow error breaks WM_TAKE_FOCUS
http://code.google.com/p/partiwm/issues/detail?id=43

In send_wm_take_focus() in lowlevel/__init__.py, we pass "time" into the pyrex code where it gets used to initialize a signed 32-bit XClientMessageEvent data. This value comes from the X server time, which is 32-bit unsigned. On my system (xvfb from X.org 1.9.0 on a 32-bit system) my server time is a value that does not fit in a 32-bit signed quantity and so Python raises an overflow error.

The ICCCM documentation glosses over this problem. I poked around for other C implementations and I _think_ that people just usually cast the uint32 to the long. The attached patch does that in python (which isn't easy, but this is a known idiom) and fixes the problem. Perhaps this should be in pyx code....


Attachments:
        patch  788 bytes


_______________________________________________
Parti-discuss mailing list
[email protected]
http://lists.partiwm.org/cgi-bin/mailman/listinfo/parti-discuss

Reply via email to