Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/engines/x11


Modified Files:
        ewl_engine_x11.c 


Log Message:
- you can now use -display to set the display for Ewl to start X11 apps on.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/engines/x11/ewl_engine_x11.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- ewl_engine_x11.c    8 Jan 2007 13:32:41 -0000       1.38
+++ ewl_engine_x11.c    8 Jan 2007 13:40:53 -0000       1.39
@@ -52,7 +52,7 @@
 static Ecore_Event_Handler *ee_focus_out_handler = NULL;
 
 static void ee_shutdown(Ewl_Engine *engine);
-static int ee_init(Ewl_Engine *engine);
+static int ee_init(Ewl_Engine *engine, int *argc, char ** argv);
 static void ee_window_new(Ewl_Window *win);
 static void ee_window_destroy(Ewl_Window *win);
 static void ee_window_move(Ewl_Window *win);
@@ -146,7 +146,7 @@
        if (!engine)
                DRETURN_PTR(NULL, DLEVEL_STABLE);
 
-       if (!ee_init(EWL_ENGINE(engine)))
+       if (!ee_init(EWL_ENGINE(engine), argc, argv))
        {
                FREE(engine);
                DRETURN_PTR(NULL, DLEVEL_STABLE);
@@ -156,9 +156,11 @@
 }
 
 static int
-ee_init(Ewl_Engine *engine)
+ee_init(Ewl_Engine *engine, int *argc, char ** argv)
 {
        Ewl_Engine_Info *info;
+       char *display = NULL;
+       int i;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("engine", engine, FALSE);
@@ -167,7 +169,19 @@
        if (ee_expose_handler)
                DRETURN_INT(TRUE, DLEVEL_STABLE);
 
-       if (!ecore_x_init(NULL))
+       if (argc && argv)
+       {
+               for (i = 1; i < *argc; i++)
+               { 
+                       if (!strcmp(argv[i], "-display"))
+                       {
+                               if (++i < *argc)
+                                       display = argv[i];
+                       }
+               }
+       }
+
+       if (!ecore_x_init(display))
        {
                fprintf(stderr, "Unable to initialize Ecore X.\n"
                                "Is your DISPLAY variable set correctly?\n\n");



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to