Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
changing Metacity/GNOME focus behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Thu Mar 11, 2004 2:06 am    Post subject: changing Metacity/GNOME focus behavior Reply with quote

New versions of Metacity, GNOME's window manager, have a different focus behavior. The "old way," and the way I like it, was if I had the "Select windows when the mouse moves over them" option checked in "Window Preferences," I could enter text, scroll, etc., in a background window. This was nice for doing other things on top of a maximized Firefox window, for example. Then they changed it so that any click would raise the background window.

I think they changed it because of the bug found at http://bugzilla.gnome.org/show_bug.cgi?id=115072. The problem is, I like the feature and haven't been affected by the bug. Some searching and experimenting later, I found that all I have to do is change one instance of the word "TRUE" to "FALSE". Here's what I did (feel free to point out a better way):

Code:
emerge metacity

wait for it to extract, then hit Ctrl-Z
open the file /var/tmp/portage/metacity-2.7.0/work/metacity-2.7.0/src/display.c (note: I'm on GNOME 2.6.0-beta1 from breakmygentoo.net, your version number is probably different)
near line 1370, you'll see a block of code that looks like this
Code:
                  /* Raise on clicking the client area always or only
                   * in click to focus mode? The debate rages.
                   * Feel free to change TRUE to FALSE or vice versa
                   */
                  if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK */)
                    {
                      meta_window_raise (window);

change the second TRUE to FALSE, save and exit
Code:
fg %emerge
killall metacity

When I killed metacity, it respawned without closing any windows I had open at the time, but it's probably best to make sure you have everything saved in case it closes all the windows.
Back to top
View user's profile Send private message
giannifive
n00b
n00b


Joined: 29 Jan 2004
Posts: 50
Location: Chicago, IL

PostPosted: Sat Mar 20, 2004 12:13 am    Post subject: Reply with quote

This is a total hack, but it looks like it should work. This new "click to raise in sloppy mode" behavior happened for me when Metacity 2.6.5 got marked stable yesterday (it didn't exist in 2.6.3). Metacity is truly an unconfigurable piece of crap, but I do like how it integrates so well with GNOME. That's the only reason I'm holding off on using Sawfish at the moment...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum