var monitor_rect = screen.get_monitor_geometry (screen.get_primary_monitor());
This will give you the rectangle of the primary monitor in dual screen setup (tested with twinview setup).
var monitor_rect = screen. get_monitor_ geometry (screen. get_primary_ monitor( ));
This will give you the rectangle of the primary monitor in dual screen setup (tested with twinview setup).