Getting rid of self-resizing windows in Ubuntu Linux 12.04

I’ve been using a pre-release “daily build” installation of Ubuntu 12.04 “Precise Pangolin” and noticed that current default for Gnome is for windows to resize themselves when you get close to the edge of the screen. I have two 22″ widescreen monitors and if I moved a window near the top edge it would maximize and fill the screen. If I moved a window to any edge Gnome would decide for me that what I “really” wanted was to enlarge the window to fill half the screen or do something else equally annoying. This might work well on a 10″ netbook screen, but on dual 22″ monitors it’s annoying as hell.

I tracked the problem down to a setting in Compiz, the screen compositing tool used by many Linux desktop environments, so if you’re using KDE or Unity with Compiz and you’re finding self-resizing windows irritating this fix should work for you as well.

To fix the problem you need to install the CompizConfig Settings Manager, so fire up Synaptic Package Manager and search for “compizconfig-settings-manager” and install it.

Once installed, if you’re using Gnome go to Applications > System Tools > Preferences and click “CompizConfig Settings Manager” to start the tool.

Scroll down to “Window Management.”

Uncheck “Place Windows”.

Leave “Grid” checked, but click the word “Grid” to get the Grid settings, then go to the Edges tab and change all Resize Actions to “None”.

Click Back.

Now your desktop will do what you tell it to do, rather than second-guessing you and doing something that you do not want.

One thing that you can now do (that you probably really don’t want) is to have the title bar (and it’s controls) move off-screen, which means you can’t move or resize the window unless you Alt-right-click on it. To fix that issue:

Check the “Put” plugin.

Click the word “Put” to bring up more options, go to the “Misc Options” tab, check “Avoid Offscreen”, click Back, then Close Window.

Hope you find this useful.

21 Comments »

  1. Gregory Fong Said,

    April 26, 2012 @ 2:30 am

    I actually like that behavior, though I’m still using Ubuntu 10.04, so I just set up my windows like that using a keyboard shortcut. IMO the mouse snap is a useful thing once you get used to it, but then again I liked the idea before it became a common thing.

    Something that I feel is useful: assuming you’re clicking on the title bar and dragging to move windows, I’d recommend holding alt and left clicking anywhere in the window to move them instead. Gives you a larger target and generally you avoid the snap unless you really want it.

  2. Lance Flavell Said,

    May 27, 2012 @ 12:35 am

    Thank you. I’ve newly installed Ubuntu 12.04 and had to reinstall from scratch once the autoupdate-install botched things. Getting everything back to a useful state, this has been an issue in graphics programs (Gmp windows were snapping and causing unintentional lines when the canvas moved under the brush because a window was jumping to the screen borders at odd times) which I’m hoping is now fixed.

  3. Bonzo Said,

    July 1, 2012 @ 10:29 am

    Thanks!

  4. John Yrigoyen Said,

    July 12, 2012 @ 1:29 pm

    This, as well as un-checking a couple of other windows setting actually solved some other strange behaviours while moving windows around the cube. THANK YOU for sharing!

  5. czystaf Said,

    July 31, 2012 @ 11:50 am

    Thanks man! :)

  6. Kwisatz Haderach Said,

    August 2, 2012 @ 4:18 am

    I’m using Ubuntu 12.04 + Compiz running as a VMWare guest on a Windows machine. I run the VM in full screen and every time the VM would loose focus (e.g. an alert in the Windows host) it would resize to a tiny box. When I then maximised the VM back, all the windows within the VM would be maximized and windows from other workspaces would get merged into the one.

    It was driving me mad. Thanks for the fix !

  7. David Anderson Said,

    August 7, 2012 @ 12:21 pm

    Unfortunately, for me doing the above results in the title bar being invisible,
    so I have to move the window by hand. Ugly. Launchpad 973559 and 994893
    and more about title bars indicate others have titlebar problems too.

  8. blogger Said,

    August 15, 2012 @ 2:55 am

    Thanks, auto maximizing of windows on top edge was really annoing, especially on my 30 inch monitor.

  9. Steve Jones Said,

    August 31, 2012 @ 9:09 am

    This also cures another odd behaviour: I found that if I moved a window partially off-screen, it would jump back onto the screen as soon as I moved focus to another window. I like my windows to stay where I put them!

  10. Doug Said,

    September 18, 2012 @ 2:23 pm

    Thankyou so much – I found that doing similar using gconf-editor caused my desktop to crash and require repair mode each time!

  11. HeS Said,

    September 22, 2012 @ 2:36 am

    Thanks a lot!!

  12. Keith Olson Said,

    September 29, 2012 @ 5:00 am

    Thank you so very, very, much.
    My blood pressure was rising to the exploding point before I found this reference.

    There seems to be a disturbing trend in current interface design to install unwanted, undesirable, “auto-” tools by default with difficulty in disabling these “features”. Spell “correction” is enabled by default on my iPhone, Auto-formatting is enabled by default in OpenOffice, Google SketchUp has an “auto-snap” feature that makes trying to do 3D design about as much fun as building a house of cards using fly-paper.

    At least I have one source to buck this trend.
    I will pass this reference on to as many others as I can.

  13. Frank Said,

    October 19, 2012 @ 4:13 pm

    Thanks, this was driving me crazy. I thought I went with Linux because I didn’t want the Windows’ “We know best, so just listen to us” attitude.

  14. Ronnie Said,

    October 23, 2012 @ 7:39 am

    Thank you for a really helpful post

  15. Eric Promislow Said,

    October 29, 2012 @ 3:18 pm

    I ran into the same problem David Anderson reported at
    http://earlruby.org/2012/04/getting-rid-of-self-resizing-windows-in-ubuntu-linux-12-04/#comment-721

    All I want: if I move a window partly off-screen, it stays there. If there’s an adjacent screen there, the other part shows in that screen. And new windows are created at a position where the title bar can be grabbed without needing to do Alt–Move and mouse around. Unfortunately it seems that I can get one of these behaviors or the other, but not both.

    Note to implementors: In general, assume I know what I’m doing when I move a window around. To see what I want, go find a 25-year-old Sun workstation and notice how the defaults are perfectly usable. And if you get any UI ideas from your smartphone, leave it at home or lend it to a friend for a day and spend some more time with that Sun box (a 90s-era Next machine will also do).

    I’m finding Fedora gives a better front-end Linux experience, and ubuntu should just be used for servers.

  16. lalune Said,

    November 20, 2012 @ 4:37 pm

    O.M.G. THANK YOU! That has been making me nuts for ages. The more we go along, the worse we get! Now we have the system second-guessing you, less control being given to us by default. What is happening? It didn’t used to be like this. I don’t even remember when that annoying behaviour started, I’ve just been trying to tolerate it for so long! Finally I found the cure here!

  17. Pat Said,

    December 3, 2012 @ 6:25 pm

    Thank you, this window behavior has caused me to migrate from Ubuntu to Kubuntu. There, at least, the user retains more control over the behavior of the windows. Your help might be enough to bring me back to what used to be my favorite OS.

  18. Martin W Said,

    December 4, 2012 @ 1:12 am

    Thanks soo much. I was about to put the hammer through the screen when I found your post. Great!

  19. wolf Said,

    November 7, 2013 @ 4:24 pm

    Great, just what I was looking for to use in Zorin linux to get rid of that damnable effect!
    Now if I can just find how to stop the window shuffling when selecting a window below another that will be be even better!

  20. Michael F Said,

    April 8, 2014 @ 6:31 am

    Many thanks for that clear explanation.

    If only it hadn’t been required!

  21. Ben S Said,

    May 4, 2014 @ 12:01 pm

    Thanks for the solution to this – all the best!

Leave a Comment