From 7a6889bb91fa9468f85894876119840eeb4e1e2a Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 13 Jan 2011 12:09:31 +1300 Subject: [PATCH] don't special case one window --- gtk-app.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/gtk-app.c b/gtk-app.c index 1758b25..2a5925e 100644 --- a/gtk-app.c +++ b/gtk-app.c @@ -187,12 +187,9 @@ set_up_window(GMainLoop *loop, GtkWidget *window, int screen_no){ gtk_window_fullscreen(GTK_WINDOW(window)); } - /*if more than one screen is requested, set the screen number. - otherwise let it fall were it falls */ - if (option_screens > 1){ - GdkScreen * screen = gdk_screen_get_default(); - int width = gdk_screen_get_width(screen); - /* XXX placement heuristic is crap: this is better: + GdkScreen * screen = gdk_screen_get_default(); + int width = gdk_screen_get_width(screen); + /* XXX placement heuristic is crap: this is better: int monitors = gdk_screen_get_primary_monitor(GdkScreen *screen); @@ -204,11 +201,10 @@ set_up_window(GMainLoop *loop, GtkWidget *window, int screen_no){ gint gdk_screen_get_monitor_at_point(GdkScreen *screen, gint x, gint y); - */ - int x = (width / option_screens) * screen_no + 1; - gtk_window_move(GTK_WINDOW(window), x, 50); - g_print("putting window %d at %d\n", screen_no, x); - } + */ + int x = (width / option_screens) * screen_no + 1; + gtk_window_move(GTK_WINDOW(window), x, 50); + g_print("putting window %d at %d\n", screen_no, x); // attach key press signal to key press callback gtk_widget_set_events(window, GDK_KEY_PRESS_MASK); -- 2.11.4.GIT