Author: post
Date: 2010-11-16 17:46:30 +0100 (Tue, 16 Nov 2010)
New Revision: 3627

Modified:
   trunk/src/gtk-interface.c
Log:
Fix detection of multiple X screens again. Don't allocate too large array. 
Don't free static display list.

Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c   2010-11-16 16:29:40 UTC (rev 3626)
+++ trunk/src/gtk-interface.c   2010-11-16 16:46:30 UTC (rev 3627)
@@ -529,7 +529,7 @@
                        for (j = 0; j < mons; j++)
                        {
                                /* We do not add the monitor with the current 
window */
-                               if (!g_strcmp0(screen_name, main_screen_name) 
&& j != main_screen_monitor)
+                               if (!(0 == g_strcmp0(screen_name, 
main_screen_name) && j == main_screen_monitor))
                                {
                                        cmon = g_malloc(sizeof(MonitorInfo));
                                        cmon->screen = screen;
@@ -544,7 +544,6 @@
        if (total_monitors <= 0)
        {
                g_free(main_screen_name);
-               g_slist_free(disps);
                gui_status_notify(_("Unable to detect more than one monitor. 
Cannot open offscreen preview"));
                return;
        }
@@ -563,7 +562,7 @@
                GSList *screen_widgets = NULL;
                guint status = gui_status_push(_("Select screen to open 
fullscreen preview"));
                waiting_for_user_selects_screen = TRUE;
-               ScreenWindowInfo **info = g_malloc(sizeof(ScreenWindowInfo) * 
total_monitors);
+               ScreenWindowInfo **info = g_malloc(sizeof(ScreenWindowInfo*) * 
total_monitors);
                gint i;
                for (i = 0; i < total_monitors; i++)
                {


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to