From 9d0ccc1c5ca687bc017b2b515a9d3a47e98ce521 Mon Sep 17 00:00:00 2001 From: schurig Date: Fri, 10 Sep 2004 12:18:17 +0000 Subject: added support for DEVFS --- (limited to 'core/applets/vtapplet') 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 odebug << "VTApplet::popup" << oendl; struct vt_stat vtstat; +#ifdef QT_QWS_DEVFS + int fd = ::open( "/dev/vc/0", O_RDWR ); +#else int fd = ::open( "/dev/tty0", O_RDWR ); +#endif if ( fd == -1 ) return 0; if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0; @@ -104,7 +108,11 @@ void VTApplet::changeVT( int index ) { //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; +#ifdef QT_QWS_DEVFS + int fd = ::open("/dev/vc/0", O_RDWR); +#else int fd = ::open("/dev/tty0", O_RDWR); +#endif if ( fd == -1 ) return; ioctl( fd, VT_ACTIVATE, index-500 ); } -- cgit v0.9.0.2