Bug 891 - mouse pointer jumps after opening the root menu
Status: CLOSED INVALID
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: 3.0-rc1
Hardware: PC Linux
: P2 normal
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2003-09-30 16:35 EDT by Arwed v. Merkatz
Modified: 2007-05-16 15:52:01 EDT
0 users

See Also:


Attachments
my rc.xml (8.08 KB, text/xml)
2003-10-01 14:43 EDT, Arwed v. Merkatz
patch that fixes the problem (793 bytes, patch)
2003-10-02 13:01 EDT, Arwed v. Merkatz

Description Arwed v. Merkatz 2003-09-30 16:35:45 EDT
i use focus follows mouse with autoraise and placement under mouse cursor.
when i open the root-menu by clicking on the desktop with the mouse pointer in
the lower right screen corner, the root menu gets opened and the mouse pointer
jumps to a position left and upper from the root menu instead of staying where
it was
Comment 1 Dana Jansens 2003-10-01 13:49:41 EDT
This was the intent.
Comment 2 Arwed v. Merkatz 2003-10-01 13:57:00 EDT
what's the idea behind this? it makes the root-menu practically useless for me
since it's a pain to always move the mous back to where the menu actually is
Comment 3 Dana Jansens 2003-10-01 14:04:24 EDT
Um, it should be jumping to the top left corner of the menu, so that the same
motion always takes you to the same place in the menu. If its jumping too far,
you probably bound the ShowMenu action more than once.
Comment 4 Arwed v. Merkatz 2003-10-01 14:10:45 EDT
it is a bug then, the show-menu action is only bound once to the mouse (though
there are keyboard bindings for it too), and it only happens if the mouse is in
the lower right of the screen
Comment 5 Dana Jansens 2003-10-01 14:36:11 EDT
Where is it jumping to?

Please attach your rc.xml as well.
Comment 6 Arwed v. Merkatz 2003-10-01 14:43:27 EDT
Created attachment 109 [details]
my rc.xml
Comment 7 Arwed v. Merkatz 2003-10-01 14:44:07 EDT
it looks like it's jumping exactly twice as far as it should, but i really can't
find any duplicate bindings in my config
Comment 8 Dana Jansens 2003-10-01 14:50:14 EDT
Which binding are you using to pop the menu?
Comment 9 Arwed v. Merkatz 2003-10-01 14:54:40 EDT
some more info:
it only jumps twice as far as needed if the root menu that pops up ends up being
over another window, on an empty desktop it works fine.

bindings i use for the root-menu:
mouse: middle button on desktop
keyboard: the two windows keys (Super_L, Super_R)
Comment 10 Dana Jansens 2003-10-01 14:56:21 EDT
I can't reproduce this with your rc.xml. It moves the mouse to the top of the menu.
Comment 11 Arwed v. Merkatz 2003-10-01 15:11:41 EDT
The problem seems to be caused by rox (http://rox.sourceforge.net) when i let it
draw the desktop. Strange thing is that i removed all other bindings for the
middle mouse button except for the desktop one, and don't have any icons there
that could be recognized as client windows by openbox
Comment 12 Dana Jansens 2003-10-02 00:01:39 EDT
Oh, I bet i know what it is. Make it stop sending copies of the mouse events to
the root window. I'm pretty sure it has an option for this.
Comment 13 Arwed v. Merkatz 2003-10-02 12:00:58 EDT
Still happens, i tried messing with the rox code and haven't found anything
wrong with it. It doesn't send copies of mouse events to the root window, it
forwards them if it doesn't handle them itself. If i disable that openbox
doesn't get any root window clicks anymore.
The weird thing about all this is that it doesn't happen every time i click on
the desktop, sometimes it works as it's supposed to.
Comment 14 Arwed v. Merkatz 2003-10-02 13:01:19 EDT
Created attachment 110 [details]
patch that fixes the problem

this patch fixes the problem for me, though it's a bit ugly, since it has a
special case for mouse buttons 1-3, but without that '&& (button <= 3)' X
freezes when i use the mouse wheel to switch desktops
Comment 15 Dana Jansens 2003-10-03 01:40:29 EDT
Rox *shouldn't* be sending the mouse events it doesn't use to the root window.
Openbox grabs them on the Rox window. This behavior should be toggleable in Rox,
and should be disabled when running Openbox. I won't patch Openbox because Rox
is resending the mouse events.
Comment 16 Arwed v. Merkatz 2003-10-03 07:15:54 EDT
Without rox sending those events to the root window it's not possible to have
mouse bindings for the desktop, since openbox never gets any events for the
desktop. But i know rox uses a very strange method of doing the desktop, so i
understand that you don't want to add hacks to openbox for this. I'll just keep
patching my copy locally.
Comment 17 Dana Jansens 2003-10-03 11:53:07 EDT
If the rox desktop window is type _NET_WM_TYPE_DESKTOP then Openbox does grab
the events on its window. So they do not need to and shouldn't be resent to the
root window.