Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using gtkmm-2.4 for my Ubuntu apps and to determine the size of the window for the application I use get_desktop_geometry. This returns the dimensions of the display you ask for. My issue is that when I use these dimensions to size my window, the window is slightly too big because I didn't account for the unity launcher (on the side) and the unity panel (across the top).

Has anyone encountered this issue? Does anyone have any ideas or suggestions?

Thanks in advance!

share|improve this question
This is indeed the right place to ask this question. – Rafał Cieślak Jan 28 '13 at 19:38

I believe it doesn't need calculating since it's always 25 px. The panel cannot be resized so far and I can't find its size either but whenever I need the value I input 25 which doesn't vary even on different resolutions. It's a terrible job on the end of Unity but there's not much to be done about it except go through the source code.

EDIT: The size of the launcher is the size of the icons (from 32 to 64 and default is 48) which is returned by gconftool --get /apps/compiz-1/plugins/unityshell/screen0/options/icon_size + 14 px.

share|improve this answer
Thanks for this, I hadn't considered the fact that the panel can't be resized. The Launcher however will still be an issue for me. – tonyg Jun 11 '13 at 21:43
Right, I forgot about the launcher size. I can't even access it from dconf/gconf. I know that if the size of the icons is 32, the pixel width of it is 47 but that's about it... – sinekonata Jun 20 '13 at 20:48
If anyone is curious, I never found a great solution to this problem but what I did do is just size my window to about 80% of the size of the screen by default. That way if the user really wants to they can manually maximize the window (which works of course) but by default the window is slightly smaller than the whole monitor. Anyway thanks a lot for the help sinekonata! – tonyg Aug 27 '13 at 14:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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