Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_fb


Modified Files:
      Tag: SPLIT
        ecore_fb.c 


Log Message:


fix so it works on ipaq again... hmmm... vt stuff is wierd
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_fb/Attic/ecore_fb.c,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -3 -r1.1.2.12 -r1.1.2.13
--- ecore_fb.c  6 Mar 2003 07:15:39 -0000       1.1.2.12
+++ ecore_fb.c  6 Mar 2003 12:01:35 -0000       1.1.2.13
@@ -2,6 +2,7 @@
 #include "Ecore.h"
 #include "ecore_fb_private.h"
 #include "Ecore_Fb.h"
+#include "ecore_private.h"
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -396,8 +397,6 @@
        if (!_ecore_fb_ts_fd_handler_handle)
          {
             close(_ecore_fb_ts_fd);
-            _ecore_fb_init_count--;
-            return 0;
          }
      }
    if (_ecore_fb_ts_fd < 0)
@@ -414,8 +413,6 @@
             if (!_ecore_fb_ts_fd_handler_handle)
               {
                  close(_ecore_fb_ps2_fd);
-                 _ecore_fb_init_count--;
-                 return 0;
               }
          }
      }
@@ -438,6 +435,18 @@
 /* FIXME: switch away works.. but switch to the allocated vt doesnt */      
 /*          printf("%s\n", buf); */
             _ecore_fb_tty_fd = open(buf, O_RDWR);
+            if (_ecore_fb_current_vt == 1)
+              {
+                 Ecore_Event_Signal_User *e;
+                 
+                 e = _ecore_event_signal_user_new();
+                 if (e)
+                   {
+                      e->number = 2;
+                      _ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
+                                       _ecore_event_signal_user_free, NULL);
+                   }
+              }
          }
        tcgetattr(_ecore_fb_tty_fd, &_ecore_fb_tty_prev_tio_mode);
        ioctl(_ecore_fb_tty_fd, KDGETMODE, &_ecore_fb_tty_prev_kd_mode);
@@ -995,7 +1004,9 @@
             else if (!strcmp(e->keyname, "F12")) vt_switch = 11;
             if (_ecore_fb_ctrl > 2) _ecore_fb_ctrl = 2;
             if (_ecore_fb_alt > 2) _ecore_fb_alt = 2;
-            if (vt_switch >= 0)
+            if ((vt_switch >= 0) &&
+                (_ecore_fb_ctrl) &&
+                (_ecore_fb_alt))
               _ecore_fb_vt_switch(vt_switch);
          }
        else
@@ -1192,34 +1203,40 @@
        /* gain */
        if (_ecore_fb_func_fb_gain)
          _ecore_fb_func_fb_gain(_ecore_fb_func_fb_gain_data);
-       _ecore_fb_ts_fd = open("/dev/touchscreen/0", O_RDONLY);
-       if (_ecore_fb_ts_fd >= 0)
+       if (!_ecore_fb_ts_fd)
          {
-            prev_flags = fcntl(_ecore_fb_ts_fd, F_GETFL);
-            fcntl(_ecore_fb_ts_fd, F_SETFL, prev_flags | O_NONBLOCK);
-            _ecore_fb_ts_fd_handler_handle = 
ecore_main_fd_handler_add(_ecore_fb_ts_fd, 
-                                                                       ECORE_FD_READ,
-                                                                       
_ecore_fb_ts_fd_handler, NULL,
-                                                                       NULL, NULL);
-            if (!_ecore_fb_ts_fd_handler_handle)
+            _ecore_fb_ts_fd = open("/dev/touchscreen/0", O_RDONLY);
+            if (_ecore_fb_ts_fd >= 0)
               {
-                 close(_ecore_fb_ts_fd);
+                 prev_flags = fcntl(_ecore_fb_ts_fd, F_GETFL);
+                 fcntl(_ecore_fb_ts_fd, F_SETFL, prev_flags | O_NONBLOCK);
+                 _ecore_fb_ts_fd_handler_handle = 
ecore_main_fd_handler_add(_ecore_fb_ts_fd, 
+                                                                            
ECORE_FD_READ,
+                                                                            
_ecore_fb_ts_fd_handler, NULL,
+                                                                            NULL, 
NULL);
+                 if (!_ecore_fb_ts_fd_handler_handle)
+                   {
+                      close(_ecore_fb_ts_fd);
+                   }
               }
          }
        if (_ecore_fb_ts_fd < 0)
          {
-            _ecore_fb_ps2_fd = open("/dev/psaux", O_RDWR);
-            if (_ecore_fb_ps2_fd >= 0)
+            if (!_ecore_fb_ps2_fd)
               {
-                 prev_flags = fcntl(_ecore_fb_ps2_fd, F_GETFL);
-                 fcntl(_ecore_fb_ps2_fd, F_SETFL, prev_flags | O_NONBLOCK);
-                 _ecore_fb_ts_fd_handler_handle = 
ecore_main_fd_handler_add(_ecore_fb_ps2_fd, 
-                                                                            
ECORE_FD_READ,
-                                                                            
_ecore_fb_ps2_fd_handler, NULL,
-                                                                            NULL, 
NULL);
-                 if (!_ecore_fb_ts_fd_handler_handle)
+                 _ecore_fb_ps2_fd = open("/dev/psaux", O_RDWR);
+                 if (_ecore_fb_ps2_fd >= 0)
                    {
-                      close(_ecore_fb_ps2_fd);
+                      prev_flags = fcntl(_ecore_fb_ps2_fd, F_GETFL);
+                      fcntl(_ecore_fb_ps2_fd, F_SETFL, prev_flags | O_NONBLOCK);
+                      _ecore_fb_ts_fd_handler_handle = 
ecore_main_fd_handler_add(_ecore_fb_ps2_fd, 
+                                                                                 
ECORE_FD_READ,
+                                                                                 
_ecore_fb_ps2_fd_handler, NULL,
+                                                                                 
NULL, NULL);
+                      if (!_ecore_fb_ts_fd_handler_handle)
+                        {
+                           close(_ecore_fb_ps2_fd);
+                        }
                    }
               }
          }




-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to