[openbox] mouse wrap to other side of screen

John Russell drjimmy42 at yahoo.com
Sun Jan 18 02:10:41 EST 2004


john: smacks forhead

ok, here is the patch.

John

On Sun, 2004-01-18 at 02:09, John Russell wrote:
> Ok, so I gave this mouse warping thing a shot.  Attached is a rough
> patch which steals gratuitously from Mikael's small edgeswitch program. 
> There is some stuff in the XCreateWindow function and attribute_set
> stuff which I'm not sure is necessary or not, but I left it there
> because it works.  
> 
> I also had to edit the event_ignore function so that EnterNotify events
> would make their way down to the mouse_event function where I thought
> this behavior belonged.  I'm sure that the event_ignore function is
> there for a reason and I'm not sure if I overstepped my bounds by
> futzing with it.  
> 
> Also, this is clearly behavior that some people would like and some
> would find truly offensive.  I'll look into how ob does options and see
> if I can't get this in to rc.xml or something.  
> 
> Please let me know what you think of this.
> 
> Also, while this experience did motivate me to start sifting through the
> ob code, I have to go back to something I said a while ago.  There are
> absolutely no comments in this code.  I mean there is the odd /* don't
> remove this */ or something, but not that much.  
> 
> When I brought this up last time, Ben told me to submit patches with
> comments in them.  Well, here's one.  Also let this serve as an
> impassioned plea to ob hackers.  If you find yourself in the code for
> whatever reason, and think that you know what the function you are in
> does, please please please write a little one sentence blurb at the top
> of the function with some helpful tips and the basic idea of what is
> going on.  It might make the barrier to entry a little lower for the odd
> person who's been wanting to help out, but can't figure out what the
> #$@#$@ is going on.  Global scope kills me.  I'm a long time java
> wheenie so I'm used to knowing where a function came from.  Anyway,
> thanks in advance.  Hope you like the patch.  
> 
> Thanks for the great WM.
> 
> Sincerely,
> John 
> 
> On Thu, 2004-01-15 at 09:16, Mikael Magnusson wrote:
> > On Thu, 15 Jan 2004, Mikael Magnusson wrote:
> > 
> > > On Wed, 14 Jan 2004, John Russell wrote:
> > > 
> > > > What I meant was, I'm using xinerama and my _desktop_ is very wide as it
> > > > is spread across 2 monitors.  I wanted to know of a way to have the
> > > > mouse wrap from one side of one monitor all the way to the other side of
> > > > my desktop.  I hope that is clearer.
> > > > 
> > > > John
> > > > 
> > > 
> > > Try this, and give -w and -h for width and height since i dont know the
> > > proper xinerama calls. and yes, i had a similar program lying around :)
> > 
> > And you can remove the north and south windows if you want to save a few 
> > bytes of memory
> > 
> > --
> > Mikael Magnusson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warp.patch
Type: text/x-patch
Size: 3101 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20040118/0f441f85/attachment.bin>


More information about the openbox mailing list