Codeblocks is taking a lot portion of my screen.I want it to take less screen (preferably upto the red rectangular size i have drawn).Is there any way I can do it ?

I can resize the height, but that's not what I want. It seems I cannot change the width though.

enter image description here

  • Can you not resize the window? What is the problem?
    – Nmath
    Sep 25 at 3:06
  • I can resize it.In this way I can make the length shorter(which I don't want) but the width remain same. @Nmath
    – yoMama33
    Sep 25 at 3:09
  • Perhaps this is a limitation of this particular application that it has a minimum width? Have you exhausted all application settings/preferences from within the application?
    – Nmath
    Sep 25 at 3:14
  • I checked all the settings.There is no option like that
    – yoMama33
    Sep 25 at 3:23
  • 1
    The minwidth of codeblocks' windows is equivalent to the width of its menu items, so it can't be resized below that. Sep 25 at 6:03

Minimum window size

Windows have a minimum size, and can't (obviously) be resized below these specifications.

If you are on X (not Wayland) You can see what is the minimum width & hight of a window* : open a terminal and type the command:


Then press Return. Subsequently, click on the target window.

The output will look like:

        program specified minimum size: 551 by 159
        program specified base size: 0 by 0
        window gravity: NorthWest

In the case of Codeblocks, it turns out the window's minwidth is at least the width of its menu bar.

*For the exact size & position of a window, we also need to take into account the _NET_FRAME_EXTENTS and _GTK_FRAME_EXTENTS

  • Nice answer. Is there any way to modify those minimum values?
    – Will
    Sep 25 at 7:23
  • 1
    @Will, I am afraid not, it's often in the code of an application, or if not, defined by the used toolkit. Sep 25 at 7:35
  • I am using ubuntu 20.04 . Run the command and got this output WM_NORMAL_HINTS(WM_SIZE_HINTS): program specified minimum size: 387 by 145 program specified resize increment: 10 by 22 program specified base size: 66 by 101 window gravity: NorthWest I got my answer on your above comments "The minwidth of codeblocks' windows is equivalent to the width of its menu items, so it can't be resized below that" .You can write it as an answer so that I can accept it
    – yoMama33
    Sep 25 at 7:49
  • 1
    @yoMama33 Yay! yeah, I thought something like that. I checked, installed codeblocks, my menu is smaller, but still won't resize to below the menu size. Sep 25 at 8:40
  • 1
    @JacobVlijm Probably you have not installed contrib plugin .So there are less option in your menu bar compare to me. Btw Thank you
    – yoMama33
    Sep 25 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.