Could we get a grow window to size of contents

Asked by Jesse Wayde Brandao on 2012-06-24

I have a screen with a large resolution and many times there will be websites and and applications whose content fits in a smaller dimension and you'll see large areas with nothing. It would be preferable if the window would grow sufficiently to display all it's content and leave the rest for the desktop's wallpaper. It's tedious to have to resize each window manually. This could be resolved with a shortcut or caption button. You can find a screenshot of this situation here http://screencloud.net/v/FIeL
If anyone is willing to show me the ropes on how I could do this, I wouldn't mind working on it, I have some clutter experience.

Question information

Language:
English Edit question
Status:
Solved
For:
Gala Edit question
Assignee:
No assignee Edit question
Solved by:
Jesse Wayde Brandao
Solved:
2012-06-24
Last query:
2012-06-24
Last reply:
2012-06-24
Tom Beckmann (tombeckmann) said : #1

I don't think that's possible. From gala's side you can only get the windows current geometry, which doesn't tell you how big its contents are.
You could do some hacky stuff like going through the widget hierarchies and looking for a ScrolledWindow that might hold this primary content and then resize the window to fit that, but for example Chromium doesn't use Gtk, so you'd even have to write the whole thing for multiple toolkits.

Jesse Wayde Brandao (jessewb) said : #2

Thanks for answering. If I find some free time, I'll see what I can do at least with windows that use GTK, if I make any progress I'll say something. Then if anyone wants to use it, I'd love to share. Thank again.