window-frame-offset weirdness on 64bit OS



Hello,

Recently I migrated from FreeBSD i386 to FreeBSD amd64, and noticed
that 'window-frame-offset' started to return extremely large values.
Due to that, 'warp-cursor-to-window' didn't work correctly.

% sawfish-client -e '(window-frame-offset (get-window-by-name-re "xconsole"))'
(1073741819 . 1073741802)

Actually these values are (0x3ffffffb . 0x3fffffea) in hex.

After some investigation, I noticed that frame_x and frame_y of struct
lisp_window were declared as 'u_int' in sawmill.h, but actually these
had negative values.  Changing them to 'int' fixed the problem.

% sawfish-client -e '(window-frame-offset (get-window-by-name-re "xconsole"))'
(-5 . -22)

Here is a small patch.

--- sawmill.h.orig      Mon Jan 13 05:35:23 2003
+++ sawmill.h   Thu May  4 00:52:59 2006
@@ -153,7 +153,7 @@
     /* Frame data */
     Window frame;
     struct frame_part *frame_parts;
-    u_int frame_x, frame_y;            /* relative to client-window */
+    int frame_x, frame_y;              /* relative to client-window */
     u_int frame_width, frame_height;
     void (*destroy_frame)(struct lisp_window *w);
     void (*focus_change)(struct lisp_window *w);

I'm using sawfish version 1.3 (+ get_x_property patch for 64bit OS)
and librep 0.16.2 from FreeBSD Ports collection.

Regards,
-- 
Yoshiaki Kasahara
Computing and Communications Center, Kyushu University
kasahara nc kyushu-u ac jp



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]