3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- qt-2.3.10/src/kernel/qgfxlinuxfb_qws.cpp~ramses.patch
7 +++ qt-2.3.10/src/kernel/qgfxlinuxfb_qws.cpp
10 static void writeTerm(const char* termctl, int sizeof_termctl)
13 - const char* tt[]={"/dev/vc/1","/dev/console","/dev/tty",0};
15 - const char* tt[]={"/dev/console","/dev/tty","/dev/tty0",0};
17 - const char** dev=tt;
19 - int tty=::open(*dev,O_WRONLY);
20 +qWarning("writeTerm");
21 + int tty=::open("/dev/vc/2", O_WRONLY);
23 ::write(tty,termctl,sizeof_termctl);
33 bool QLinuxFbScreen::initDevice()
35 +qWarning("QLinuxFbScreen::initDevice");
36 /* Setting up the VT parameters is done in qapplication_qws.cpp
37 const char termctl[]="\033[9;0]\033[?33l\033[?25l";
38 writeTerm(termctl,sizeof(termctl)); */
43 +qWarning("QLinuxFbScreen::shutdownDevice");
45 // Blankin' screen, blinkin' cursor!
46 const char termctl[] = "\033[9;15]\033[?33h\033[?25h\033[?0c";
47 writeTerm(termctl,sizeof(termctl));
52 --- qt-2.3.10/src/kernel/qapplication_qws.cpp~ramses.patch
53 +++ qt-2.3.10/src/kernel/qapplication_qws.cpp
58 - qWarning( "qt_init() - starting in daemon mode..." );
67 - syslog( 4, "qt_init() [%d] - successfully entered daemon mode", pid2 );
68 _exit( 0 ); // ok, second fork performed
71 @@ -1828,9 +1825,12 @@
72 #if defined(_OS_LINUX_)
73 if ( qws_terminal_id )
75 - qDebug( "qt_init() - terminal specification is '%d'.", qws_terminal_id );
76 struct vt_stat console_stat;
78 + int console_fd = ::open( QString().sprintf( "/dev/vc/%d", qws_terminal_id ).latin1(), O_RDWR );
80 int console_fd = ::open( QString().sprintf( "/dev/tty%d", qws_terminal_id ).latin1(), O_RDWR );
82 if ( console_fd == -1)
84 qWarning( "qt_init() - can't open tty: %s", strerror( errno ) );
85 @@ -1927,7 +1927,11 @@
87 qDebug( "qt_cleanup() - switching back to virtual terminal #%d", qws_terminal_old );
90 + int console_fd = ::open( "/dev/vc/0", O_RDWR );
92 int console_fd = ::open( "/dev/tty0", O_RDWR );
94 if ( console_fd == -1)
96 qWarning( "qt_init() - can't open tty: %s", strerror( errno ) );
97 --- qt-2.3.10/src/kernel/qwindowsystem_qws.cpp~ramses.patch
98 +++ qt-2.3.10/src/kernel/qwindowsystem_qws.cpp
102 #ifndef QT_NO_QWS_KEYBOARD
103 +#ifndef QT_QWS_RAMSES
104 static int keyUnicode(int keycode)
106 const QWSServer::KeyMap *km = QWSServer::keyMap();
107 @@ -1803,6 +1804,7 @@
113 Send a key event. You can use this to send key events generated by
115 @@ -1845,8 +1847,10 @@
117 event.simpleData.unicode =
118 #ifndef QT_NO_QWS_KEYBOARD
119 +#ifndef QT_QWS_RAMSES
120 unicode < 0 ? keyUnicode(keycode) :
124 event.simpleData.keycode = keycode;
125 event.simpleData.modifiers = modifiers;