[Gtk-sharp-list] Dual/multi monitor support?

Stephane Delcroix stephane at delcroix.org
Mon Sep 7 04:40:38 EDT 2009


If by *screen* you mean *monitor* and you hav a single *sceen* splitted
on 2 *monitors*, you can do this:

//This will tell you on which monitor your window is on
Gdk.Screen screen = this.Screen;
int monitor = screen.GetMonitorAtWindow (parent.GdkWindow);

//Now, you can move it at will using Move (x, y), and it's easy to get
one monitor Bounds with:
Gdk.Rectangle bounds = screen.GetMonitorGeometry (monitor);

More info on
http://www.go-mono.com/docs/index.aspx?link=T%3aGdk.Screen%2f*

hot it helps

s



On Mon, 2009-09-07 at 01:15 -0700, markdarb wrote:
> Hi,
> 
> Is it possible to see/change which screen a window is displayed on in
> multi-monitor setups? I'd like to be able to do this for both fullscreen and
> normal windows.
> 
> The functions gtk_window_set_screen() and gtk_window_get_screen() listed at
> http://library.gnome.org/devel/gtk/unstable/GtkWindow.html are the sort of
> thing I'm looking for, but I haven't been able to find anything along those
> lines implemented in Gtk#.
> 
> Many thanks,
> Mark.



More information about the Gtk-sharp-list mailing list