I'm using Python PyGTK library on OS Linux based (suse, ubuntu) Working on devices with multiple Display Monitors.
I'm trying to put a Full Screen Window (in python, gtk.Window) on a Specific Display monitor connected to the Device.
I'm using the following code:
n_monitors = gtk.gdk.Screen.get_n_monitors() # Get number of monitors.
gtk.gdk.Screen.get_monitor_geometry(*monitor_number*) # Get the size of a specific monitor.
The second api returns the monitor size and offset information.
gtk.Window.move(offset_x, offse_y)
can be used for moving a window on a specific monitor.
Though this doesn't seem to work all the time. It looks like the window has an affinity to the mouse location or if the monitor resolutions are not the same this does not work.
Is there any property of the gtk.Window which would help mitigate this issue. I tried playing with following which didn't help :
gtk.Window.set_position(gtk.WIN_POS_NONE)
gtk.Window.set_gravity(gtk.gdk.GRAVITY_NORTH_WEST)
Any ideas.