Re: Moving windows with Alt+F7



On Sat, Jul 10, 2010 at 7:59 PM, William Case <billlinux rogers com> wrote:
> Hi;
>
> If I use the Alt-F7 key, I can grab a window and move it either using my
> mouse or arrow keys.  I would like to be able to fine tune this window
> movement.  Right now the arrow keys move a window by about 25? pixels
> with each button press.  I would like to get at the program that does
> this so I can set up something like:
>
> While in window move mode:
> 1 Arrow key press = 25? pixels (i.e. remains unchanged)
> 1 Ctlr-Arrow key press = 1 pixel
>
> With the above solution I can then set exact placement without trial and
> error for use in xwininfo or window postioning programs like compiz or
> devilspie.
>
> Some direction on where I might find the appropriate gnome setup or
> configuration programs. Or, maybe this is too complex a task and should
> be a request for enhancement.  Advice please ?
>

The window movement issue is something that comes from the window manager.
In the case of Fedora, it is either metacity or compiz. You need to
check the process list of your system to see which one is running.

If you have metacity (or if you are fine to disable 3D effects), see
http://git.gnome.org/browse/metacity/tree/src/include/all-keybindings.h#n275

This line shows that, by default, Alt-F7 does the window moving.
Note that two functions are referenced, begin_move() and handle_begin_move().
You could replicate the code for a different shortcut, and change
slightly those functions to do precise window movement with the
keyboard.

You can get the source code of metacity with

sudo apt-get install git-core
git clone git://git.gnome.org/metacity

For compiz you can try a similar search; the repository is at
http://git.compiz.org/

In either case, you need to file a feature request at the respective
Bugzilla with the request for this feature. A developer may choose to
implement, or you could help by creating a patch (makes things
faster!).

Good luck,
Simos


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