summaryrefslogtreecommitdiff
path: root/core/applets/vtapplet/vt.cpp
Unidiff
Diffstat (limited to 'core/applets/vtapplet/vt.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vtapplet/vt.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp
index aec63c3..7832ee0 100644
--- a/core/applets/vtapplet/vt.cpp
+++ b/core/applets/vtapplet/vt.cpp
@@ -80,7 +80,11 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const
80 odebug << "VTApplet::popup" << oendl; 80 odebug << "VTApplet::popup" << oendl;
81 81
82 struct vt_stat vtstat; 82 struct vt_stat vtstat;
83#ifdef QT_QWS_DEVFS
84 int fd = ::open( "/dev/vc/0", O_RDWR );
85#else
83 int fd = ::open( "/dev/tty0", O_RDWR ); 86 int fd = ::open( "/dev/tty0", O_RDWR );
87#endif
84 if ( fd == -1 ) return 0; 88 if ( fd == -1 ) return 0;
85 if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0; 89 if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0;
86 90
@@ -104,7 +108,11 @@ void VTApplet::changeVT( int index )
104{ 108{
105 //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; 109 //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl;
106 110
111#ifdef QT_QWS_DEVFS
112 int fd = ::open("/dev/vc/0", O_RDWR);
113#else
107 int fd = ::open("/dev/tty0", O_RDWR); 114 int fd = ::open("/dev/tty0", O_RDWR);
115#endif
108 if ( fd == -1 ) return; 116 if ( fd == -1 ) return;
109 ioctl( fd, VT_ACTIVATE, index-500 ); 117 ioctl( fd, VT_ACTIVATE, index-500 );
110} 118}