[sawfish: 1/2] Fix an unprocessed option bug.



commit 9b8ad88764c44cd8f07d4932045ed52eb1fd4f25
Author: Timo Korvola <tkorvola iki fi>
Date:   Tue Dec 28 12:30:35 2010 +0200

    Fix an unprocessed option bug.
    
    Arrange so that rep_get_option("--replace", 0) always gets called.
    Otherwise Sawfish will later attempt to load a file named --replace.

 src/display.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/display.c b/src/display.c
index 0110a95..54a74a2 100644
--- a/src/display.c
+++ b/src/display.c
@@ -412,7 +412,8 @@ sys_init(char *program_name)
             xa_manager = XInternAtom (dpy, "MANAGER", False);
 
             sel_owner = XGetSelectionOwner (dpy, xa_wm_sn);
-            if (sel_owner != None && !rep_get_option ("--replace", 0))
+	    /* Order is significant: rep_get_option must get called. */
+            if (!rep_get_option ("--replace", 0) && sel_owner != None)
             {
                 fputs ("A window manager is already running but "
                        "--replace was not given.\n", stderr);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]