Gtk.Menu.prototype.set_monitor
function set_monitor(monitor_num:Number):void { // Gjs wrapper for gtk_menu_set_monitor() }
Informs GTK+ on which monitor a menu should be popped up. See Gdk.get_monitor_geometry.
This function should be called from a Gtk.MenuPositionFunc if the menu should not appear on the same monitor as the pointer. This information can't be reliably inferred from the coordinates returned by a Gtk.MenuPositionFunc, since, for very long menus, these coordinates may extend beyond the monitor boundaries or even the screen boundaries.
Since 2.4
- monitor_num
the number of the monitor on which the menu should be popped up