Search code examples
user-interfacewindowgtkgtk3glade

Window vs Offscreen window


In the 3xx versions of GLADE Interface Designer there is a toplevel widget called "Offscreen window", which icon has the looking of that: enter image description here

How it differs from the common window toplevel widget enter image description here and what is it used for?


Solution

  • It's used for containing widgets that should not be on screen, yet should be drawn / rendered. According to the documentation the only supported use is screenshots:

    GtkOffscreenWindow is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy.

    However, it also sometimes comes in handy for unit tests.