[openbox] mouse wrap to other side of screen

John Russell drjimmy42 at yahoo.com
Sun Jan 18 22:32:59 EST 2004


> I'm no master at C programming, but doesn't this create new windows 
> everytime you reconfigure without destroying the old ones?
> 

Uh, well... err yes it does appear so, but I stole it from your code, so
I believe the blame lies squarely on _your_ shoulders ;-). No seriously,
that's a good point.  I believe I have addressed that issue in this
updated patch along with adding the boolean option warpPointer to
config.[hc] which can used in rc.xml now.  It defaults to off. 

2 more things that are bugging me that I would like help with.

1) I am using XDestroyWindow to make sure that the windows don't pile
up, but I would like to check to see if the windows are created before I
destroy them.  It seems more efficient to avoid the XDestroyWindow call
if it isn't necessary.  So how do I test the warp_window_east/west
variables to see if they have been set yet?  Or am I going about it all
wrong?

2) Whenever I compile, I get errors that look like this

 openbox/mouse.c: In function `mouse_event':
openbox/mouse.c:303: warning: assignment makes pointer from integer
without a cast
openbox/mouse.c:306: warning: assignment makes pointer from integer
without a cast
openbox/mouse.c: In function `mouse_create_warp_windows':
openbox/mouse.c:382: warning: initialization makes pointer from integer
without a cast

in reference to lines like this

    Rect *rect = screen_physical_area();

What is wrong with that?  I see it all over the place in other parts of
OB, but mine throw warnings.  Thanks for the help.


John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warp2.patch
Type: text/x-patch
Size: 7517 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20040118/a5a149f8/attachment.bin>


More information about the openbox mailing list