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:


allocate a new vt... when starting.. and handle switches.. but now swithc back
doesnt work... hm,mmm
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_fb/Attic/ecore_fb.c,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -3 -r1.1.2.11 -r1.1.2.12
--- ecore_fb.c  5 Mar 2003 22:40:27 -0000       1.1.2.11
+++ ecore_fb.c  6 Mar 2003 07:15:39 -0000       1.1.2.12
@@ -1,3 +1,4 @@
+
 #include "Ecore.h"
 #include "ecore_fb_private.h"
 #include "Ecore_Fb.h"
@@ -424,19 +425,24 @@
      {
        struct termios tio;
        struct vt_mode new_vtmode;
-       struct vt_stat vts;
+       int vtno;
        
+       if ((ioctl(_ecore_fb_tty_fd, VT_OPENQRY, &vtno) != -1))
+         {
+            char buf[64];
+            
+            _ecore_fb_current_vt = vtno;
+            ioctl(_ecore_fb_tty_fd, VT_ACTIVATE, _ecore_fb_current_vt);
+            close(_ecore_fb_tty_fd);
+            snprintf(buf, sizeof(buf), "/dev/tty%i", _ecore_fb_current_vt);
+/* FIXME: switch away works.. but switch to the allocated vt doesnt */      
+/*          printf("%s\n", buf); */
+            _ecore_fb_tty_fd = open(buf, O_RDWR);
+         }
        tcgetattr(_ecore_fb_tty_fd, &_ecore_fb_tty_prev_tio_mode);
        ioctl(_ecore_fb_tty_fd, KDGETMODE, &_ecore_fb_tty_prev_kd_mode);
        ioctl(_ecore_fb_tty_fd, KDGKBMODE, &_ecore_fb_tty_prev_mode);
        ioctl(_ecore_fb_tty_fd, VT_GETMODE, &_ecore_fb_vt_prev_mode);
-       if (ioctl(_ecore_fb_tty_fd, VT_GETSTATE, &vts) < 0)
-         {
-            /* HACK - need to better handle this if not on a vt */
-            _ecore_fb_current_vt = 1;
-         }
-       else
-         _ecore_fb_current_vt = vts.v_active;
        tio.c_iflag = tio.c_oflag = tio.c_cflag = tio.c_lflag = 0;
        tio.c_cc[VTIME] = 0;
        tio.c_cc[VMIN] = 1;




-------------------------------------------------------
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