summaryrefslogtreecommitdiff
path: root/packages/qte/qte-2.3.10/mnci.patch
blob: c2e0e079d9c14f8f116c72698188af85fb4e876d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- qt-2.3.10/src/kernel/qgfxlinuxfb_qws.cpp~ramses.patch
+++ qt-2.3.10/src/kernel/qgfxlinuxfb_qws.cpp
@@ -249,20 +249,12 @@
 
 static void writeTerm(const char* termctl, int sizeof_termctl)
 {
-#ifdef QT_QWS_DEVFS
-    const char* tt[]={"/dev/vc/1","/dev/console","/dev/tty",0};
-#else
-    const char* tt[]={"/dev/console","/dev/tty","/dev/tty0",0};
-#endif
-    const char** dev=tt;
-    while (*dev) {
-	int tty=::open(*dev,O_WRONLY);
+qWarning("writeTerm");
+        int tty=::open("/dev/vc/2", O_WRONLY);
 	if ( tty>=0 ) {
 	    ::write(tty,termctl,sizeof_termctl);
 	    ::close(tty);
 	}
-	dev++;
-    }
 }
 
 /*!
@@ -275,6 +267,7 @@
 
 bool QLinuxFbScreen::initDevice()
 {
+qWarning("QLinuxFbScreen::initDevice");
     /* Setting up the VT parameters is done in qapplication_qws.cpp
     const char termctl[]="\033[9;0]\033[?33l\033[?25l";
     writeTerm(termctl,sizeof(termctl)); */
@@ -765,9 +758,12 @@
     }
 */
 
+qWarning("QLinuxFbScreen::shutdownDevice");
+/*
     // Blankin' screen, blinkin' cursor!
     const char termctl[] = "\033[9;15]\033[?33h\033[?25h\033[?0c";
     writeTerm(termctl,sizeof(termctl));
+*/
 }
 
 /*!
--- qt-2.3.10/src/kernel/qapplication_qws.cpp~ramses.patch
+++ qt-2.3.10/src/kernel/qapplication_qws.cpp
@@ -1756,8 +1756,6 @@
      */
     if ( qws_daemon )
     {
-        qWarning( "qt_init() - starting in daemon mode..." );
-
         int pid1 = fork();
         if ( pid1 == -1 )
         {
@@ -1791,7 +1789,6 @@
         }
         if ( pid2 )
         {
-             syslog( 4, "qt_init() [%d] - successfully entered daemon mode", pid2 );
             _exit( 0 ); // ok, second fork performed
         }
     }
@@ -1828,9 +1825,12 @@
     #if defined(_OS_LINUX_)
     if ( qws_terminal_id )
     {
-        qDebug( "qt_init() - terminal specification is '%d'.", qws_terminal_id );
         struct vt_stat console_stat;
+#ifdef QT_QWS_DEVFS
+        int console_fd = ::open( QString().sprintf( "/dev/vc/%d", qws_terminal_id ).latin1(), O_RDWR );
+#else
         int console_fd = ::open( QString().sprintf( "/dev/tty%d", qws_terminal_id ).latin1(), O_RDWR );
+#endif
         if ( console_fd == -1)
         {
             qWarning( "qt_init() - can't open tty: %s", strerror( errno ) );
@@ -1927,7 +1927,11 @@
         {
             qDebug( "qt_cleanup() - switching back to virtual terminal #%d", qws_terminal_old );
 
+#ifdef QT_QWS_DEVFS
+            int console_fd = ::open( "/dev/vc/0", O_RDWR );
+#else
             int console_fd = ::open( "/dev/tty0", O_RDWR );
+#endif
             if ( console_fd == -1)
             {
                 qWarning( "qt_init() - can't open tty: %s", strerror( errno ) );
--- qt-2.3.10/src/kernel/qwindowsystem_qws.cpp~ramses.patch
+++ qt-2.3.10/src/kernel/qwindowsystem_qws.cpp
@@ -1791,6 +1791,7 @@
 }
 
 #ifndef QT_NO_QWS_KEYBOARD
+#ifndef QT_QWS_RAMSES
 static int keyUnicode(int keycode)
 {
     const QWSServer::KeyMap *km = QWSServer::keyMap();
@@ -1803,6 +1804,7 @@
     return 0xffff;
 }
 #endif
+#endif
 /*!
   Send a key event. You can use this to send key events generated by
   "virtual keyboards".
@@ -1845,8 +1847,10 @@
 
     event.simpleData.unicode = 
 #ifndef QT_NO_QWS_KEYBOARD
+#ifndef QT_QWS_RAMSES
 	unicode < 0 ? keyUnicode(keycode) : 
 #endif
+#endif
 	unicode;
     event.simpleData.keycode = keycode;
     event.simpleData.modifiers = modifiers;