GTK+ to multiple displays: use
- From: Paul Santa Maria <paulsm1021 yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: GTK+ to multiple displays: use
- Date: Wed, 6 Apr 2005 12:58:34 -0700 (PDT)
Hi -
I was trying to adapt the GDK demo from "Multi-Head Support Overview", and was
getting a link unresolved on "gdk_display_new()".
The fix was to substitute "gdk_display_open()" instead:
THIS CODE SUCCESSFULLY REDIRECTS TO SPECIFIED MONITOR:
-----------------------------------------------------
GtkWidget *
create_drawing_area ()
{
GdkDisplay *gdisplay;
GtkWidget *window;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *da;
GtkWidget *label;
/* Create toplevel window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");
/* Assign screen and display */
gdisplay = gdk_display_open("unix:0.2");
if (gdisplay) {
GdkScreen *gscreen;
gscreen = gdk_display_get_default_screen(gdisplay);
if (gscreen) {
gtk_window_set_screen(GTK_WINDOW(window), gscreen);
}
else {
printf ("WARNING: Unable to get screen!\n");
...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]