Documentation
¶
Overview ¶
Command multiwindow shows several windows. The first window has a button that opens a new window and one that opens a dialog; every window is the same page with a counter of its own, so any window can open more. A dialog is modal to the window that opened it, and closes with it. It uses only package material, imported as m.
Every window is also a drop target: drag a file from a file manager, or some text, onto "Drop here" to see its path; "Drag me" can be dragged out of the window, into a text editor or into another window of the app. (Drags between applications need a pointer button held down, so they cannot be tried on a headless compositor.)
Closing the first window while another is open keeps the app running; the app ends with the last window.
Run it with: go run ./examples/multiwindow
Environment: GLUTTER_BACKEND=x11|wayland, GLUTTER_SCREENSHOT=<file.png>. In debug builds: GLUTTER_DEV_OPEN=window,dialog opens a window, a dialog, or both when the first window is shown.