Is there any way to stop a window's title bar merging with the panel when maximised?

17,195

Solution 1

ctrl + alt 5 seems to be your best bet as of right now. Sorry. Perhaps to remove temptation you could remove the maximize button in Ubuntu-Tweak but as of right now if you maximize the window, it simply will merge the titlebar with the menubar

Solution 2

You can disable window maximize to title bar when a titlebar is dragged near to the Unity Top/Superior bar.

Visit: http://ubuntuforums.org/showthread.php?t=1743309 ( Note post #6 by stevecomrie )

  • Open CompizConfig Settings Manager
  • Click on the "Grid" in the "Window Management" category
  • Click on the "Edges" tab
  • Open the "Resize Actions" drop down
  • Change the "Top Edge" drop down to "None"
  • Close CompizConfig and you're all done.

This is only a partial solution. Some applications will still launch themselves into the merged state when you run them. And, you can still inadvertantly cause a merge by double-clicking on the title bar of an an unmerged application. Anybody with a clue as to how to completely disable any and all variations of unity panel merging with an application's title bar would be appreciated!

Solution 3

For Unity 3D, you can try this script.

Basically it will check for maximized windows and will demaximize them and resize them to the max width height possible (that after you make tests you find it to be working well on your machine); play also with nXpos and nYpos if you feel something is not working fine.

demaximize.sh 1005 710 #for 1024x768 that works here at least...

#!/bin/bash

# make tests to your system, this works 'here' at 1024x768
nWidth=$1 #1005
nHeight=$2 #710
nXpos=1
nYpos=22

while true; do 
    windowId=`xdotool getactivewindow`;
    if xwininfo -wm -id $windowId |tr -d '\n' |grep -q "Maximized Vert.*Horz";then
        wmctrl -i -r $windowId -b toggle,maximized_vert,maximized_horz;
        xdotool windowsize $windowId $nWidth $nHeight;
        xdotool windowmove $windowId $nXpos $nYpos;
        xdotool getwindowname $windowId
    fi; 
    sleep 0.5;
done

PS.: for chrome/chromium work better, enable "use system title and borders" option

Solution 4

Source: http://ubuntuguide.net/unity-2d-how-to-removeenable-maximized-window-titlebar

This can be handled by gconftool. If you have the GUI frontend "gconf-edtor" installed, just launch it and navigate to /apps/metacity/general, then un-check “show_maximized_titlebars” to remove the maximized window titlebar.


Or, you can execute this command in terminal to remove it:

gconftool --type bool --set /apps/metacity/general/show_maximized_titlebars false

Run this to re-enable it:

gconftool --type bool --set /apps/metacity/general/show_maximized_titlebars true
Share:
17,195

Related videos on Youtube

Richard Turner
Author by

Richard Turner

Updated on September 18, 2022

Comments

  • Richard Turner
    Richard Turner over 1 year

    I'm working on a desktop machine with plenty of screen real-estate, so I don't need my windows' title bars to merge with the global menu bar when the windows are maximised. Moreover, I'm working on a dual-screen set-up, so the fact that a window is maximised doesn't mean that it's the only window visible.

    Before Unity I'd switch to a maximised window by clicking on its title bar, or close the window, even though it isn't focused, by clicking on its close button; I can no longer do this because the title bar is missing and the global menu bar is empty on that screen. This isn't a huge problem - I can click on some of the window's chrome to focus it - but it's unintuitive and it's forcing me to relearn my mousing behaviour.

    I'd like to turn-off the merging of title and global menu bars, but how?

    EDIT:

    I simply want the title bar of the window NOT to merge with the top panel whenever I maximize a Window. The global menu should stay in the top panel as far as I am concerned. Current it maximizes like this

    enter image description here

    I want it to maximize like this (In that screeny the unmaximized Window has been resized to take rest of the space)

    enter image description here

  • ImaginaryRobots
    ImaginaryRobots about 12 years
    This solution can also be used to disable the left/right edge behaviour as well.
  • Richard Turner
    Richard Turner about 11 years
    I hadn't used Unity for a long time since I posted this question, so I've been unable to test people's responses. I had high hopes for your answer, but in full-blown Unity on Ubuntu 12.10 it doesn't work. Perhaps it only ever worked for Unity 2D....
  • web.learner
    web.learner almost 11 years
    Yes, this only works for Unity 2D. Notice apps/metacity. Unity 3D uses Compiz, Unity 2D uses Metacity.
  • AlexP
    AlexP almost 11 years
    Any update on this?
  • Aquarius Power
    Aquarius Power over 10 years
    ctrl+alt+5 does nothing here, but ctrl+alt+numpad5 just maximizes and the titlebar still merges :(
  • Aquarius Power
    Aquarius Power over 10 years
    @AlexP I wrote a script below that may help you too :)
  • Richard Turner
    Richard Turner over 10 years
    I'm glad life is better for you having found a solution to your problem, but this bears no relation to the question asked, which is about window titlebars, not about the global menu.
  • Richard Turner
    Richard Turner over 10 years
    A novel approach, but really this is a terrible hack isn't it? :)
  • Aquarius Power
    Aquarius Power over 10 years
    ...that works and can be improved to work even better :), my current implementation has 220 lines of code :D, but it is indeed a terrible hack... I am forced to fix window placement "bugs?" of the window manager and many other strange things that would not be necessary if there was a window manager option to not maximize and just make the window have the maximum size possible; So that it would just be pseudo-maximized...