In this case you would need to initialize your struct with *rows, *cols before you call ioctl(). But, it should not affect the actual Gnome window itself, but the used area inside. Have you looked for a Gnome api to see if there are something there that let's you do what you want?