make the root-menu appear at a fixed location when opening it with a keyboard shortcut, possible?

Micha <[email protected]>
Newsgroups gmane.comp.window-managers.openbox
Message-ID <[email protected]>
Hi folks !
I don't know, how to step into an active subject, hope this will appear
where it belongs to.:-[
When I first read the posts of this topic, I wouldn't believe, that there is
any problem achieving such behaviour.
But then I realized, there are two different actions involved:
1.: Setting the pointer ( with Xdotool )
2.: Calling the root-menu

In the OB rc.xml, this would need 2 action-tags( "execute" and "show-menu" )
performed inside one keybind-tag.
I've tested it, and both actions were working, but not together !
The pointer was placed correctly, but the root-menu was displayed at the
former pointer coordinates.
Maybe, putting the xdotool-call into a Bash script, with a little sleep 
at the
end might help to place the menu at the new coordinates.

But I ended with this weird workaround:
I just created one shortcut for the moderated menu positioning, and a
second one for the normal menu-call.
The part of the rc.xml looks like that :
     ...
     <keybind key="W-r">
       <action name="ShowMenu">
         <menu>root-menu</menu>
       </action>
     </keybind>
     <keybind key="W-j">
       <action name="Execute">
         <execute>xdotool mousemove 200 100 key super+r</execute>
       </action>
     </keybind>
     ...
With W(indows)-r, the root-menu is placed at the current pointer, and with
W-j, Xdotool is called, which first places the pointer at the new position,
and then simulates the W-r shortcut, which places the root-menu at the
pointer position.

Hope this helps,

Micha














_______________________________________________
openbox mailing list
[email protected]
http://icculus.org/mailman/listinfo/openbox
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.