diff options
author | Chris Larson <clarson@kergoth.com> | 2004-11-09 00:36:47 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-11-09 00:36:47 +0000 |
commit | f96441b9faf769c9ecdd4d338b605ea3d0cc4010 (patch) | |
tree | edb17ec2c4ea13c5acb1c7350957a249a820e28d /qte/qte-2.3.8-snapshot | |
parent | b6588aa6851fb220cedc387d21c51513ef8d67f4 (diff) |
Disable bk EOLN_NATIVE conversions on all files in packages FILESPATHs, to prevent it screwing up patches.
BKrev: 4190111fA4MuVozAqwE7xOSL9fr-TA
Diffstat (limited to 'qte/qte-2.3.8-snapshot')
-rw-r--r-- | qte/qte-2.3.8-snapshot/compile.patch | 19 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/daemonize.patch | 113 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/encoding.patch | 49 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/fix-qgfxraster.patch | 29 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/lefthand.patch | 126 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/no-moc.patch | 32 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/qconfig-qpe.h | 124 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/qpe.patch | 100 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/qte238-iconviewspeed.patch | 145 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/qtopia.patch | 120 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/qwsmouse-tosa.diff | 27 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/sharp_char.h | 309 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/simpad.patch | 403 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/switches.h | 74 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/tslib.patch | 349 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/update-qtfontdir | 62 | ||||
-rw-r--r-- | qte/qte-2.3.8-snapshot/vt-switch.patch | 205 |
17 files changed, 2286 insertions, 0 deletions
diff --git a/qte/qte-2.3.8-snapshot/compile.patch b/qte/qte-2.3.8-snapshot/compile.patch index e69de29bb2..ce4ca82fcb 100644 --- a/qte/qte-2.3.8-snapshot/compile.patch +++ b/qte/qte-2.3.8-snapshot/compile.patch @@ -0,0 +1,19 @@ +--- configure 2002-09-06 20:04:34.000000000 -0400 ++++ configure.new 2002-09-06 20:04:16.000000000 -0400 +@@ -250,7 +250,7 @@ + PLATFORM= + XPLATFORM= + FROMMAKE= +-QT_CXX="" ++QT_CXX=" \$(CXXFLAGS_EXTRA)" + + + # Parse the arguments, setting things to "yes" or "no". +@@ -1356,6 +1356,7 @@ + COMPILER=`echo $PLATFORM | cut -f 2- -d-` + if [ "$COMPILER" = "g++" ] + then ++ QT_CXX="$QT_CXX -fpermissive" + if [ "$GPLUSPLUS_EXCEPTIONS" = "no" ] + then + QT_C="$QT_C -fno-exceptions" diff --git a/qte/qte-2.3.8-snapshot/daemonize.patch b/qte/qte-2.3.8-snapshot/daemonize.patch index e69de29bb2..1f83398988 100644 --- a/qte/qte-2.3.8-snapshot/daemonize.patch +++ b/qte/qte-2.3.8-snapshot/daemonize.patch @@ -0,0 +1,113 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- qt-2.3.7/src/kernel/qapplication_qws.cpp~daemonize 2004-07-17 22:47:54.840820000 +0200 ++++ qt-2.3.7/src/kernel/qapplication_qws.cpp 2004-07-17 23:34:32.407525912 +0200 +@@ -103,6 +103,7 @@ + #endif + + #include <sys/time.h> ++#include <syslog.h> + + #if defined(_OS_AIX_) && defined(_CC_GNU_) + #include <sys/select.h> +@@ -162,6 +163,7 @@ + //these used to be environment variables, they are initialized from + //environment variables in + ++bool qws_daemon = TRUE; + bool qws_savefonts = FALSE; + bool qws_screen_is_interlaced=FALSE; //### should be detected + bool qws_shared_memory = FALSE; +@@ -1614,6 +1616,10 @@ + mwGeometry = argv[i]; + } else if ( arg == "-shared" ) { + qws_shared_memory = TRUE; ++ } else if ( arg == "-daemon" ) { ++ qws_daemon = TRUE; ++ } else if ( arg == "-nodaemon" ) { ++ qws_daemon = FALSE; + } else if ( arg == "-noshared" ) { + qws_shared_memory = FALSE; + } else if ( arg == "-savefonts" ) { +@@ -1670,6 +1676,78 @@ + qt_appType = type; + qws_single_process = TRUE; + ++ /* Daemonize the server process -- (C) Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> ++ * Added a new command line option which only is relevant if the application is created as a GuiServer. ++ * The option is -daemon respectively -nodaemon. If in daemon mode (which is the default now), the ++ * server will detach from the controlling terminal and continue as a daemon. This is done via the standard ++ * UNIX double fork magic. ++ */ ++ if ( qws_daemon ) ++ { ++ qWarning( "qt_init() - starting in daemon mode..." ); ++ ++ int pid1 = fork(); ++ if ( pid1 == -1 ) ++ { ++ qWarning( "qt_init() - can't perform initial fork: %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ if ( pid1 ) _exit( 0 ); // ok, first fork performed ++ ++ chdir( "/" ); ++ setsid(); ++ umask(0); ++ close(0); ++ close(1); ++ close(2); ++ ++ int fdnull = ::open( "/dev/null", O_RDWR ); ++ if ( fdnull == -1 ) ++ { ++ syslog( 3, "qt_init() - can't open /dev/null to redirect std{in|out|err}: %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ dup2( fdnull, 0 ); // stdin ++ dup2( fdnull, 1 ); // stdout ++ dup2( fdnull, 2 ); // stderr ++ ++ int pid2 = fork(); ++ if ( pid2 == -1 ) ++ { ++ syslog( 3, "qt_init() - can't perform initial fork: %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ if ( pid2 ) ++ { ++ syslog( 4, "qt_init() [%d] - successfully entered daemon mode", pid2 ); ++ _exit( 0 ); // ok, second fork performed ++ } ++ } ++ ++ /* ++ * , , ++ * /( )` ++ * \ \___ / | B E W A R E ! ++ * /- _ `-/ ' We are a DAEMON now! ++ * (/\/ \ \ /\ ++ * / / | ` \ ++ * O O ) / | ++ * `-^--'`< ' ++ * (_.) _ ) / ++ * `.___/` / ++ * `-----' / ++ * <----. __ / __ \ ++ * <----|====O)))==) \) /==== ++ * <----' `--' `.__,' \ ++ * | | ++ * \ / ++ * ______( (_ / \______ ++ * (FL) ,' ,-----' | \ ++ * `--{__________) \/ ++ * ++ */ ++ ++ + /* Allocate a dedicated virtual terminal -- (C) Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> + * Added a new command line option which only is relevant if the application is created as a GuiServer. + * The option is -terminal <num>, where <num> specifies the virtual terminal to be occupied by the server. diff --git a/qte/qte-2.3.8-snapshot/encoding.patch b/qte/qte-2.3.8-snapshot/encoding.patch index e69de29bb2..5ddb43c2f6 100644 --- a/qte/qte-2.3.8-snapshot/encoding.patch +++ b/qte/qte-2.3.8-snapshot/encoding.patch @@ -0,0 +1,49 @@ +German umlaute quite likely french, italian, spanish did +not work due QFile::[decode,encode]Name did call QString +local8Bit,fromLocal8Bit which plainly tried to use utf8 +encoding even if not useful. So a filename got changed +and QFileInfo recognized the file not beeing present anymore... +which lead to files not be shown. +Also with Year-Names problem exists as the base system sent +it encoded upstream. + +If you want to have UTF-8 encoding use LC_CTYPE as always and +QTextCodec::codecForLocale will use the right UTF-8 encoding. + +As fallback the old behaviour was preserved + + + + + + + +--- qt-2.3.8-old/src/tools/qstring.cpp 2004-07-23 14:33:02.000000000 +0200 ++++ qt-2.3.8/src/tools/qstring.cpp 2004-07-23 14:32:31.000000000 +0200 +@@ -14469,7 +14469,11 @@ + return qt_winQString2MB( *this ); + #endif + #ifdef _WS_QWS_ +- return utf8(); // ##### if there is ANY 8 bit format supported? ++ QTextCodec* codec = QTextCodec::codecForLocale(); ++ return codec ++ ? codec->fromUnicode(*this) ++ : utf8(); ++ //return latin1(); // ##### if there is ANY 8 bit format supported? + #endif + #endif + } +@@ -14515,7 +14519,12 @@ + return qt_winMB2QString( local8Bit ); + #endif + #ifdef _WS_QWS_ +- return fromUtf8(local8Bit,len); ++ QTextCodec* codec = QTextCodec::codecForLocale(); ++ if( len < 0) len = qstrlen(local8Bit); ++ return codec ++ ? codec->toUnicode(local8Bit, len) ++ : QString::fromUtf8(local8Bit,len); ++// return fromLatin1(local8Bit,len); + #endif + #endif // QT_NO_TEXTCODEC + } diff --git a/qte/qte-2.3.8-snapshot/fix-qgfxraster.patch b/qte/qte-2.3.8-snapshot/fix-qgfxraster.patch index e69de29bb2..3c107e8eae 100644 --- a/qte/qte-2.3.8-snapshot/fix-qgfxraster.patch +++ b/qte/qte-2.3.8-snapshot/fix-qgfxraster.patch @@ -0,0 +1,29 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- qt-2.3.7/src/kernel/qgfxraster_qws.cpp~fix-qgfxraster ++++ qt-2.3.7/src/kernel/qgfxraster_qws.cpp +@@ -3876,14 +3876,14 @@ + for( loopc2=0;loopc2<frontadd;loopc2++ ) + *(alphaptr++)=get_value_32(16,(unsigned char **)&temppos); + +- PackType temp2; +- unsigned char * cp; ++ volatile PackType temp2; ++ volatile unsigned short int * cp; + for( loopc2=0;loopc2<count;loopc2++ ) { +- temp2=*((PackType *)temppos); +- cp=(unsigned char *)&temp2; +- *(alphaptr++)=get_value_32(16,&cp); +- *(alphaptr++)=get_value_32(16,&cp); +- temppos += 2; ++ temp2=*reinterpret_cast<PackType *>(temppos); ++ cp=reinterpret_cast<volatile unsigned short int *>(&temp2); ++ *(alphaptr++)=qt_conv16ToRgb(*cp); ++ cp++; ++ *(alphaptr++)=qt_conv16ToRgb(*cp); + } + + for( loopc2=0;loopc2<backadd;loopc2++ ) diff --git a/qte/qte-2.3.8-snapshot/lefthand.patch b/qte/qte-2.3.8-snapshot/lefthand.patch index e69de29bb2..0a0cccf210 100644 --- a/qte/qte-2.3.8-snapshot/lefthand.patch +++ b/qte/qte-2.3.8-snapshot/lefthand.patch @@ -0,0 +1,126 @@ +diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp +--- qt-2.3.7_orig/src/widgets/qscrollview.cpp 2004-06-13 20:42:54.000000000 +0200 ++++ qt-2.3.7/src/widgets/qscrollview.cpp 2004-06-13 20:45:16.000000000 +0200 +@@ -526,15 +526,16 @@ + this, SLOT( doDragAutoScroll() ) ); + #endif + +- connect( &d->hbar, SIGNAL( valueChanged( int ) ), +- this, SLOT( hslide( int ) ) ); +- connect( &d->vbar, SIGNAL( valueChanged( int ) ), +- this, SLOT( vslide( int ) ) ); ++ connect( &d->hbar, SIGNAL( valueChanged(int) ), ++ this, SLOT( hslide(int) ) ); ++ connect( &d->vbar, SIGNAL( valueChanged(int) ), ++ this, SLOT( vslide(int) ) ); + d->viewport.installEventFilter( this ); + + setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + setLineWidth( style().defaultFrameWidth() ); + setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); ++ + } + + +@@ -683,6 +684,11 @@ + h-tmarg-bmarg - (showh ? hsbExt : 0) ); + } + ++/* ++ The surrounding environment (or application, if there is no ++ environment, may set this. Requires Qt >= 2.3.8. ++*/ ++bool qt_left_hand_scrollbars = FALSE; + + /*! + Updates scrollbars - all possibilities considered. You should never +@@ -786,45 +792,50 @@ + + // Position the scrollbars, viewport, and corner widget. + int bottom; ++ int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0; ++ int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt; ++ xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw; ++ int ypos = tmarg; ++ ypos = (style() == WindowsStyle) ? ypos +fw : 0; + if ( showh ) { + int right = ( showv || cornerWidget() ) ? w-vsbExt : w; + if ( style() == WindowsStyle ) +- setHBarGeometry(d->hbar, fw, h-hsbExt-fw, ++ setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw, + right-fw-fw, hsbExt ); + else +- setHBarGeometry(d->hbar, 0, h-hsbExt, right, ++ setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right, + hsbExt ); + bottom=h-hsbExt; + } else { + bottom=h; + } + if ( showv ) { +- clipper()->setGeometry( lmarg, tmarg, ++ clipper()->setGeometry( lmarg + xoffset, tmarg, + w-vsbExt-lmarg-rmarg, + bottom-tmarg-bmarg ); + d->viewportResized( w-vsbExt-lmarg-rmarg, bottom-tmarg-bmarg ); + if ( style() == WindowsStyle ) +- changeFrameRect(QRect(0, 0, w, h) ); ++ changeFrameRect(QRect(xoffset, 0, w, h) ); + else +- changeFrameRect(QRect(0, 0, w-vsbExt, bottom)); ++ changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom)); + if (cornerWidget()) { + if ( style() == WindowsStyle ) +- setVBarGeometry( d->vbar, w-vsbExt-fw, +- fw, vsbExt, +- h-hsbExt-fw-fw ); ++ setVBarGeometry( d->vbar, xpos, ++ ypos, vsbExt, ++ bottom-fw-ypos ); + else +- setVBarGeometry( d->vbar, w-vsbExt, 0, ++ setVBarGeometry( d->vbar, xpos, ypos, + vsbExt, +- h-hsbExt ); ++ bottom-ypos ); + } + else { + if ( style() == WindowsStyle ) +- setVBarGeometry( d->vbar, w-vsbExt-fw, +- fw, vsbExt, +- bottom-fw-fw ); ++ setVBarGeometry( d->vbar, xpos, ++ ypos, vsbExt, ++ bottom-fw-ypos ); + else +- setVBarGeometry( d->vbar, w-vsbExt, 0, +- vsbExt, bottom ); ++ setVBarGeometry( d->vbar, xpos, ypos, ++ vsbExt, bottom-ypos ); + } + } else { + if ( style() == WindowsStyle ) +@@ -837,12 +848,12 @@ + } + if ( d->corner ) { + if ( style() == WindowsStyle ) +- d->corner->setGeometry( w-vsbExt-fw, ++ d->corner->setGeometry( xpos, + h-hsbExt-fw, + vsbExt, + hsbExt ); + else +- d->corner->setGeometry( w-vsbExt, ++ d->corner->setGeometry( xpos, + h-hsbExt, + vsbExt, + hsbExt ); +@@ -1675,7 +1686,7 @@ + } + + /*! +- Scrolls the content by \a x to the left and \a y upwards. ++ Scrolls the content by \a dx to the left and \a dy upwards. + */ + void QScrollView::scrollBy( int dx, int dy ) + { diff --git a/qte/qte-2.3.8-snapshot/no-moc.patch b/qte/qte-2.3.8-snapshot/no-moc.patch index e69de29bb2..441442f7d1 100644 --- a/qte/qte-2.3.8-snapshot/no-moc.patch +++ b/qte/qte-2.3.8-snapshot/no-moc.patch @@ -0,0 +1,32 @@ +--- Makefile~ 2004-09-02 06:19:35 +10:00 ++++ qt-2.3.8/Makefile 2004-09-02 06:20:38 +10:00 +@@ -8,7 +8,7 @@ + init: FORCE + @$(MAKE) QTDIR=`pwd` all + +-all: symlinks src-moc src-mt sub-src sub-tools sub-tutorial sub-examples ++all: symlinks src-mt sub-src sub-tools sub-tutorial sub-examples + @echo + @echo "The Qt library is now built in ./lib" + @echo "The Qt examples are built in the directories in ./examples" +@@ -31,10 +31,10 @@ + symlinks: .buildopts + @cd include; rm -f q*.h; for i in ../src/*/q*.h ../src/3rdparty/*/q*.h ../extensions/*/src/q*.h; do ln -s $$i .; done; rm -f q*_p.h + +-sub-src: src-moc src-mt .buildopts FORCE ++sub-src: src-mt .buildopts FORCE + cd src; $(MAKE) + +-src-mt: src-moc .buildopts FORCE ++src-mt: .buildopts FORCE + $(MAKE) -f src-mt.mk + + sub-tutorial: sub-src FORCE +@@ -45,7 +45,6 @@ + + clean: + -rm .buildopts +- cd src/moc; $(MAKE) clean + cd src; $(MAKE) clean + -rm src/tmp/*.o src/tmp/*.a src/allmoc.cpp + -find src/3rdparty -name '*.o' | xargs rm diff --git a/qte/qte-2.3.8-snapshot/qconfig-qpe.h b/qte/qte-2.3.8-snapshot/qconfig-qpe.h index e69de29bb2..784283acca 100644 --- a/qte/qte-2.3.8-snapshot/qconfig-qpe.h +++ b/qte/qte-2.3.8-snapshot/qconfig-qpe.h @@ -0,0 +1,124 @@ +/********************************************************************** +** Copyright (C) 2000-2004 Trolltech AS. All rights reserved. +** +** This file is part of the Qtopia Environment. +** +** Licensees holding a valid license agreement from Trolltech or any of its +** authorized distributors may use this file in accordance with +** the License Agreement provided with the Licensed Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sales.com for +** information about Trolltech's Commercial License Agreements. +** +** Contact info.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#ifndef QT_H +#endif // QT_H + +// Note that disabling more features will produce a libqte that is not +// compatible with other libqte builds. + +#ifndef QT_DLL +#define QT_DLL // Internal +#endif + +// Qtopia Phone +#if defined(QTOPIA_PHONE) +# if !defined(QT_KEYPAD_INPUT) +# define QT_KEYPAD_INPUT +# endif +#endif + +// Platforms where mouse cursor is never required. +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) || defined(QT_KEYPAD_MODE) +# define QT_NO_QWS_CURSOR +# define QT_NO_QWS_MOUSE_AUTO +#endif + +// No builtin codecs (Qtopia uses plugins to add codecs individually) +#ifndef QT_NO_CODECS +#define QT_NO_CODECS +#endif + +// No builtin font factories (Qtopia uses plugins) +#define QT_NO_FREETYPE +#define QT_NO_BDF + +// No builtin styles (Qtopia uses plugins) +#define QT_NO_STYLE_POCKETPC +#ifndef QT_NO_STYLE_AQUA +# define QT_NO_STYLE_AQUA +#endif +#define QT_NO_STYLE_MOTIF +#define QT_NO_STYLE_PLATINUM + +// No builtin WM styles (Qtopia uses plugins) +#define QT_NO_QWS_BEOS_WM_STYLE +#define QT_NO_QWS_KDE2_WM_STYLE +#define QT_NO_QWS_KDE_WM_STYLE +#define QT_NO_QWS_WINDOWS_WM_STYLE + +// Space savings: disable expensive features +#define QT_NO_UNICODETABLES +#ifndef QT_NO_IMAGEIO_MNG +# define QT_NO_IMAGEIO_MNG +#endif +#define QT_NO_PROPERTIES +#define QT_NO_COLORNAMES + +// Space savings: features insufficiently useful on handheld device +#define QT_NO_IMAGEIO_PPM +#define QT_NO_NETWORKPROTOCOL +#define QT_NO_PICTURE +#define QT_NO_PRINTER +#define QT_NO_QWS_SAVEFONTS + +// Space savings: features impractical on small display +#define QT_NO_COLORDIALOG +#define QT_NO_FILEDIALOG +#define QT_NO_FONTDIALOG + +// Space savings: features impractical on stylus device +#define QT_NO_DIAL +#define QT_NO_DRAGANDDROP +#define QT_NO_IMAGE_TEXT +#define QT_NO_INPUTDIALOG +#define QT_NO_PRINTDIALOG +#define QT_NO_PROGRESSDIALOG +#define QT_NO_SEMIMODAL +#define QT_NO_SIZEGRIP +#define QT_NO_SPLITTER +#define QT_NO_WORKSPACE + +// Speed savings: features that incur unacceptable performance penalty +#define QT_NO_DOM +#define QT_NO_EFFECTS +#define QT_NO_TRANSFORMATIONS + +// Qt 3 features (not relevant at this time) +#define QT_NO_TRANSLATION_BUILDER +#define QT_NO_COMPLEXTEXT + +// Features included directly in Qtopia +#if !(defined (_OS_WIN32_) || defined (_WS_WIN32_)) +#define QT_NO_WIZARD_IMPL +#endif + +// Features for Qtopia under Win32 SDK +#if defined (_OS_WIN32_) || defined (_WS_WIN32_) +#define QT_NO_PRINTER +#define QT_NO_QWS_LINUXFB +#define QT_NO_QWS_MACH64 +#define QT_NO_QWS_VOODOO3 +#define QT_NO_QWS_MATROX +#define QT_NO_QWS_VNC +#define QT_NO_QWS_TRANSFORMED +#define QT_NO_QWS_VGA_16 +#define QT_NO_QWS_SVGALIB +#endif +#define QT_NO_QMEMORYFILE diff --git a/qte/qte-2.3.8-snapshot/qpe.patch b/qte/qte-2.3.8-snapshot/qpe.patch index e69de29bb2..4aa92180de 100644 --- a/qte/qte-2.3.8-snapshot/qpe.patch +++ b/qte/qte-2.3.8-snapshot/qpe.patch @@ -0,0 +1,100 @@ +--- /dev/null ++++ qt-2.3.6/src/tools/qconfig-qpe.h +@@ -0,0 +1,97 @@ ++/********************************************************************** ++** Copyright (C) 2000 Trolltech AS. All rights reserved. ++** ++** This file is part of Qtopia Environment. ++** ++** This file may be distributed and/or modified under the terms of the ++** GNU General Public License version 2 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. ++** ++** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ++** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++** ++** See http://www.trolltech.com/gpl/ for GPL licensing information. ++** ++** Contact info@trolltech.com if any conditions of this licensing are ++** not clear to you. ++** ++**********************************************************************/ ++#ifndef QT_H ++#endif // QT_H ++ ++// Empty leaves all features enabled. See doc/html/features.html for choices. ++ ++// Note that disabling some features will produce a libqt that is not ++// compatible with other libqt builds. Such modifications are only ++// supported on Qt/Embedded where reducing the library size is important ++// and where the application-suite is often a fixed set. ++ ++#ifndef QT_DLL ++#define QT_DLL // Internal ++#endif ++ ++#define QT_NO_QWS_CURSOR ++#define QT_NO_QWS_MOUSE_AUTO ++#ifndef QT_NO_CODECS ++#define QT_NO_CODECS ++#endif ++#define QT_NO_UNICODETABLES ++//#define QT_NO_IMAGEIO_BMP ++#define QT_NO_IMAGEIO_PPM ++//#define QT_NO_ASYNC_IO ++//#define QT_NO_ASYNC_IMAGE_IO ++#define QT_NO_FREETYPE ++#define QT_NO_BDF ++//#define QT_NO_FONTDATABASE ++#define QT_NO_DRAGANDDROP ++//#define QT_NO_CLIPBOARD ++#define QT_NO_PROPERTIES ++#define QT_NO_NETWORKPROTOCOL ++ ++#define QT_NO_IMAGE_TEXT ++ ++//#define QT_NO_TOOLTIP ++#define QT_NO_COLORNAMES ++#define QT_NO_TRANSFORMATIONS ++#define QT_NO_TRANSLATION_BUILDER ++#define QT_NO_COMPLEXTEXT ++#define QT_NO_PRINTER ++#define QT_NO_PICTURE ++//#define QT_NO_ICONVIEW ++#define QT_NO_DIAL ++#define QT_NO_SIZEGRIP ++#define QT_NO_WORKSPACE ++//#define QT_NO_TABLE ++//#define QT_NO_ACTION ++//#define QT_NO_SETTINGS ++#define QT_NO_STYLE_POCKETPC ++#ifndef QT_NO_STYLE_AQUA ++# define QT_NO_STYLE_AQUA ++#endif ++#define QT_NO_STYLE_MOTIF ++#define QT_NO_STYLE_PLATINUM ++#define QT_NO_FILEDIALOG ++#define QT_NO_FONTDIALOG ++#define QT_NO_PRINTDIALOG ++#define QT_NO_COLORDIALOG ++#define QT_NO_INPUTDIALOG ++//#define QT_NO_MESSAGEBOX ++#define QT_NO_PROGRESSDIALOG ++//#define QT_NO_TABDIALOG ++#define QT_NO_WIZARD ++#define QT_NO_EFFECTS ++//#define QT_NO_COMPONENT ++#define QT_NO_DOM ++#define QT_NO_SEMIMODAL ++//#define QT_NO_PROGRESSBAR ++#define QT_NO_SPLITTER ++ ++//#define QT_NO_QWS_SAVEFONTS ++//#define QT_NO_QWS_PROPERTIES ++ ++#define QT_NO_QWS_BEOS_WM_STYLE ++#define QT_NO_QWS_KDE2_WM_STYLE ++#define QT_NO_QWS_KDE_WM_STYLE ++#define QT_NO_QWS_WINDOWS_WM_STYLE ++ diff --git a/qte/qte-2.3.8-snapshot/qte238-iconviewspeed.patch b/qte/qte-2.3.8-snapshot/qte238-iconviewspeed.patch index e69de29bb2..3351bbb8f3 100644 --- a/qte/qte-2.3.8-snapshot/qte238-iconviewspeed.patch +++ b/qte/qte-2.3.8-snapshot/qte238-iconviewspeed.patch @@ -0,0 +1,145 @@ +Speed up patches backported from + +http://robotics.dei.unipd.it/~koral/KDE/kflicker.html + +and + +http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) + + + + + + + +diff -ur qt-2.3.8-old/src/iconview/qiconview.cpp qt-2.3.8/src/iconview/qiconview.cpp +--- qt-2.3.8-old/src/iconview/qiconview.cpp 2004-07-22 01:07:46.000000000 +0200 ++++ qt-2.3.8/src/iconview/qiconview.cpp 2004-07-23 19:13:09.000000000 +0200 +@@ -224,6 +224,7 @@ + QIconView::SelectionMode selectionMode; + QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; + QRect *rubber; ++ QPixmap *backBuffer; + QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, + *fullRedrawTimer; + int rastX, rastY, spacing; +@@ -2267,6 +2268,7 @@ + d->currentItem = 0; + d->highlightedItem = 0; + d->rubber = 0; ++ d->backBuffer = 0; + d->scrollTimer = 0; + d->startDragItem = 0; + d->tmpCurrentItem = 0; +@@ -2415,6 +2417,8 @@ + delete item; + item = tmp; + } ++ delete d->backBuffer; ++ d->backBuffer = 0; + delete d->fm; + d->fm = 0; + #ifndef QT_NO_TOOLTIP +@@ -2881,6 +2885,48 @@ + } + + /*! ++ This function grabs all paintevents that otherwise would have been ++ processed by the QScrollView::viewportPaintEvent(). Here we use a ++ doublebuffer to reduce 'on-paint' flickering on QIconView ++ (and of course its childs). ++ ++ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() ++*/ ++ ++void QIconView::bufferedPaintEvent( QPaintEvent* pe ) ++{ ++ QWidget* vp = viewport(); ++ QRect r = pe->rect() & vp->rect(); ++ int ex = r.x() + contentsX(); ++ int ey = r.y() + contentsY(); ++ int ew = r.width(); ++ int eh = r.height(); ++ ++ if ( !d->backBuffer ) ++ d->backBuffer = new QPixmap(vp->size()); ++ if ( d->backBuffer->size() != vp->size() ) { ++ //Resize function (with hysteesis). Uses a good compromise between memory ++ //consumption and speed (number) of resizes. ++ float newWidth = (float)vp->width(); ++ float newHeight = (float)vp->height(); ++ if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) ++ { ++ newWidth *= 1.1892; ++ newHeight *= 1.1892; ++ d->backBuffer->resize( (int)newWidth, (int)newHeight ); ++ } else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) ++ d->backBuffer->resize( (int)newWidth, (int)newHeight ); ++ } ++ ++ QPainter p; ++ p.begin(d->backBuffer, vp); ++ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); ++ p.end(); ++ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); ++} ++ ++/*! ++ + \reimp + */ + +@@ -4937,7 +4983,7 @@ + if ( !d->rubber ) + drawDragShapes( d->oldDragPos ); + } +- viewportPaintEvent( (QPaintEvent*)e ); ++ bufferedPaintEvent ((QPaintEvent*)e ); + if ( d->dragging ) { + if ( !d->rubber ) + drawDragShapes( d->oldDragPos ); +@@ -5374,11 +5420,19 @@ + return; + + if ( item->d->container1 && d->firstContainer ) { +- item->d->container1->items.removeRef( item ); ++ //Special-case checking of the last item, since this may be ++ //called a few times for the same item. ++ if (item->d->container1->items.last() == item) ++ item->d->container1->items.removeLast(); ++ else ++ item->d->container1->items.removeRef( item ); + } + item->d->container1 = 0; + if ( item->d->container2 && d->firstContainer ) { +- item->d->container2->items.removeRef( item ); ++ if (item->d->container2->items.last() == item) ++ item->d->container2->items.removeLast(); ++ else ++ item->d->container2->items.removeRef( item ); + } + item->d->container2 = 0; + +diff -ur qt-2.3.8-old/src/iconview/qiconview.h qt-2.3.8/src/iconview/qiconview.h +--- qt-2.3.8-old/src/iconview/qiconview.h 2004-07-22 01:07:46.000000000 +0200 ++++ qt-2.3.8/src/iconview/qiconview.h 2004-07-23 19:13:09.000000000 +0200 +@@ -444,6 +444,7 @@ + virtual void contentsDropEvent( QDropEvent *e ); + #endif + ++ void bufferedPaintEvent( QPaintEvent* ); + virtual void resizeEvent( QResizeEvent* e ); + virtual void keyPressEvent( QKeyEvent *e ); + virtual void focusInEvent( QFocusEvent *e ); +--- qt-2.3.8-old/src/widgets/qscrollview.cpp 2004-07-22 01:07:44.000000000 +0200 ++++ qt-2.3.8/src/widgets/qscrollview.cpp 2004-07-23 19:21:06.000000000 +0200 +@@ -1280,6 +1280,9 @@ + case QEvent::LayoutHint: + d->autoResizeHint(this); + break; ++ case QEvent::WindowActivate: ++ case QEvent::WindowDeactivate: ++ return TRUE; + default: + break; + } diff --git a/qte/qte-2.3.8-snapshot/qtopia.patch b/qte/qte-2.3.8-snapshot/qtopia.patch index e69de29bb2..0361aaf915 100644 --- a/qte/qte-2.3.8-snapshot/qtopia.patch +++ b/qte/qte-2.3.8-snapshot/qtopia.patch @@ -0,0 +1,120 @@ +--- /dev/null 2003-01-10 02:39:01.000000000 +1000 ++++ qt-2.3.7/src/tools/qconfig-qpe.h 2003-11-09 18:32:29.000000000 +1000 +@@ -0,0 +1,117 @@ ++/********************************************************************** ++** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ++** ++** This file is part of the Qtopia Environment. ++** ++** This file may be distributed and/or modified under the terms of the ++** GNU General Public License version 2 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. ++** ++** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ++** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++** ++** See http://www.trolltech.com/gpl/ for GPL licensing information. ++** ++** Contact info@trolltech.com if any conditions of this licensing are ++** not clear to you. ++** ++**********************************************************************/ ++#ifndef QT_H ++#endif // QT_H ++ ++// Note that disabling more features will produce a libqte that is not ++// compatible with other libqte builds. ++ ++#ifndef QT_DLL ++#define QT_DLL // Internal ++#endif ++ ++// Platforms where mouse cursor is never required. ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) ++# define QT_NO_QWS_CURSOR ++# define QT_NO_QWS_MOUSE_AUTO ++#endif ++ ++// No builtin codecs (Qtopia uses plugins to add codecs individually) ++#ifndef QT_NO_CODECS ++#define QT_NO_CODECS ++#endif ++ ++// No builtin font factories (Qtopia uses plugins) ++#define QT_NO_FREETYPE ++#define QT_NO_BDF ++ ++// No builtin styles (Qtopia uses plugins) ++#define QT_NO_STYLE_POCKETPC ++#ifndef QT_NO_STYLE_AQUA ++# define QT_NO_STYLE_AQUA ++#endif ++#define QT_NO_STYLE_MOTIF ++#define QT_NO_STYLE_PLATINUM ++ ++// No builtin WM styles (Qtopia uses plugins) ++#define QT_NO_QWS_BEOS_WM_STYLE ++#define QT_NO_QWS_KDE2_WM_STYLE ++#define QT_NO_QWS_KDE_WM_STYLE ++#define QT_NO_QWS_WINDOWS_WM_STYLE ++ ++// Space savings: disable expensive features ++#define QT_NO_UNICODETABLES ++#ifndef QT_NO_IMAGEIO_MNG ++# define QT_NO_IMAGEIO_MNG ++#endif ++#define QT_NO_PROPERTIES ++#define QT_NO_COLORNAMES ++ ++// Space savings: features insufficiently useful on handheld device ++#define QT_NO_IMAGEIO_PPM ++#define QT_NO_NETWORKPROTOCOL ++#define QT_NO_PICTURE ++#define QT_NO_PRINTER ++#define QT_NO_QWS_SAVEFONTS ++ ++// Space savings: features impractical on small display ++#define QT_NO_COLORDIALOG ++#define QT_NO_FILEDIALOG ++#define QT_NO_FONTDIALOG ++ ++// Space savings: features impractical on stylus device ++#define QT_NO_DIAL ++#define QT_NO_DRAGANDDROP ++#define QT_NO_IMAGE_TEXT ++#define QT_NO_INPUTDIALOG ++#define QT_NO_PRINTDIALOG ++#define QT_NO_PROGRESSDIALOG ++#define QT_NO_SEMIMODAL ++#define QT_NO_SIZEGRIP ++#define QT_NO_SPLITTER ++#define QT_NO_WORKSPACE ++ ++// Speed savings: features that incur unacceptable performance penalty ++#define QT_NO_DOM ++#define QT_NO_EFFECTS ++#define QT_NO_TRANSFORMATIONS ++ ++// Qt 3 features (not relevant at this time) ++#define QT_NO_TRANSLATION_BUILDER ++#define QT_NO_COMPLEXTEXT ++ ++// Features included directly in Qtopia ++#if !(defined (_OS_WIN32_) || defined (_WS_WIN32_)) ++#define QT_NO_WIZARD_IMPL ++#endif ++ ++// Features for Qtopia under Win32 SDK ++#if defined (_OS_WIN32_) || defined (_WS_WIN32_) ++#define QT_NO_PRINTER ++#define QT_NO_QWS_LINUXFB ++#define QT_NO_QWS_MACH64 ++#define QT_NO_QWS_VOODOO3 ++#define QT_NO_QWS_MATROX ++#define QT_NO_QWS_VNC ++#define QT_NO_QWS_TRANSFORMED ++#define QT_NO_QWS_VGA_16 ++#define QT_NO_QWS_SVGALIB ++#endif ++#define QT_NO_QMEMORYFILE diff --git a/qte/qte-2.3.8-snapshot/qwsmouse-tosa.diff b/qte/qte-2.3.8-snapshot/qwsmouse-tosa.diff index e69de29bb2..ac4a87b821 100644 --- a/qte/qte-2.3.8-snapshot/qwsmouse-tosa.diff +++ b/qte/qte-2.3.8-snapshot/qwsmouse-tosa.diff @@ -0,0 +1,27 @@ +--- qwsmouse_qws.cpp~qwsmouse-c700 2004-09-20 00:01:42.000000000 +1000 ++++ qt-2.3.9/src/kernel/qwsmouse_qws.cpp 2004-09-20 13:04:29.000000000 +1000 +@@ -71,14 +71,18 @@ + #elif defined(QT_QWS_SL5XXX) + #define QT_QWS_SL5XXX_RAW + typedef struct { +- long y; +- long x; +- long pressure; +- long long millisecs; ++ unsigned short pressure; ++ unsigned short x; ++ unsigned short y; ++ unsigned short pad; ++// long y; ++// long x; ++// long pressure; ++// long long millisecs; + } TS_EVENT; + #define QT_QWS_TP_SAMPLE_SIZE 10 + #define QT_QWS_TP_MINIMUM_SAMPLES 4 +-#define QT_QWS_TP_PRESSURE_THRESHOLD 500 ++#define QT_QWS_TP_PRESSURE_THRESHOLD 1 + #define QT_QWS_TP_MOVE_LIMIT 50 + #define QT_QWS_TP_JITTER_LIMIT 2 + #endif + diff --git a/qte/qte-2.3.8-snapshot/sharp_char.h b/qte/qte-2.3.8-snapshot/sharp_char.h index e69de29bb2..a70f5f690e 100644 --- a/qte/qte-2.3.8-snapshot/sharp_char.h +++ b/qte/qte-2.3.8-snapshot/sharp_char.h @@ -0,0 +1,309 @@ +/* + * linux/include/asm/sharp_char.h + * + * sharp drivers definitions (SHARP) + * + * Copyright (C) 2001 SHARP + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Change Log + * 12-Dec-2002 Sharp Corporation for Poodle and Corgi + */ + +#ifndef __ASM_SHARP_CHAR_H_INCLUDED +#define __ASM_SHARP_CHAR_H_INCLUDED + +/* + * If SHARPCHAR_USE_MISCDEV defined , misc driver architecture used instead of sharp_char + */ + +#define SHARPCHAR_USE_MISCDEV + +/* + * devices defines... + */ + +#ifndef SHARP_DEV_MAJOR +#define SHARP_DEV_MAJOR 11 +#endif + +#ifndef SHARP_DEV_MINOR_START +#define SHARP_DEV_MINOR_START 210 +#endif + +#define SHARP_DEV_MINOR_MAX 4 /* defines last minor number of SHARP device */ + +#define SHARP_LED_MINOR (SHARP_DEV_MINOR_START+0) +#define SHARP_BUZZER_MINOR (SHARP_DEV_MINOR_START+1) +#define SHARP_GSM_MINOR (SHARP_DEV_MINOR_START+2) +#define SHARP_AUDIOCTL_MINOR (SHARP_DEV_MINOR_START+3) +#define SHARP_KBDCTL_MINOR (SHARP_DEV_MINOR_START+4) + +/* + * ioctl defines... + */ + +#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 + +/* --- for SHARP_LED device --- */ +#define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) +#define SHARP_LED_GETSTATUS (SHARP_LED_IOCTL_START) +#define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) +#define SHARP_LED_ISUPPORTED (SHARP_LED_IOCTL_START+2) + +typedef struct sharp_led_status { + int which; /* select which LED status is wanted. */ + int status; /* set new led status if you call SHARP_LED_SETSTATUS */ +} sharp_led_status; + +#define SHARP_LED_WHICH_MAX 15 /* last number of LED */ + +/* parameters for 'which' member */ +#define SHARP_LED_PDA 0 /* PDA status */ +#define SHARP_LED_DALARM 1 /* daily alarm */ +#define SHARP_LED_SALARM 2 /* schedule alarm */ +#define SHARP_LED_BATTERY 3 /* main battery status */ +#define SHARP_LED_ACSTATUS 4 /* AC line status */ +#define SHARP_LED_CHARGER 5 /* charger status */ +#define SHARP_LED_PHONE_RSSI 6 /* phone status (RSSI...) */ +#define SHARP_LED_PHONE_DIAL 7 /* phone status (dialing...) */ +#define SHARP_LED_PHONE_IN 8 /* phone status (incoming..) */ +#define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ +#define SHARP_LED_MAIL_SEND 10 /* mail status (sending...) */ +#define SHARP_LED_MAIL_QUEUE 11 /* mail to send is in queue */ +#define SHARP_LED_COLLIE_0 12 /* 1st pri. battery LED control */ +#define SHARP_LED_COLLIE_1 13 /* 1st pri. mail LED control */ +#define SHARP_LED_COMM 14 /* communication status */ +#define SHARP_LED_BROWSER 15 /* WWW browser status */ + +/* parameters for 'status' member */ +#define LED_PDA_RUNNING 0 /* for SHARP_LED_RUN */ +#define LED_PDA_SUSPENDED 1 /* for SHARP_LED_RUN */ +#define LED_PDA_OFF 2 /* for SHARP_LED_RUN */ +#define LED_PDA_ERROR 3 /* for SHARP_LED_RUN */ + +#define LED_DALARM_OFF 0 /* for SHARP_LED_DALARM */ +#define LED_DALARM_ON 1 /* for SHARP_LED_DALARM */ + +#define LED_SALARM_OFF 0 /* for SHARP_LED_SALARM */ +#define LED_SALARM_ON 1 /* for SHARP_LED_SALARM */ + +#define LED_BATTERY_GOOD 0 /* for SHARP_LED_BATTERY */ +#define LED_BATTERY_LOW 1 /* for SHARP_LED_BATTERY */ +#define LED_BATTERY_VERY_LOW 2 /* for SHARP_LED_BATTERY */ +#define LED_BATTERY_CRITICAL 3 /* for SHARP_LED_BATTERY */ + +#define LED_CHARGER_OFF 0 /* for SHARP_LED_CHARGER */ +#define LED_CHARGER_CHARGING 1 /* for SHARP_LED_CHARGER */ +#define LED_CHARGER_ERROR 2 /* for SHARP_LED_CHARGER */ +#define LED_CHARGER_FLASH 3 + +#define LED_AC_NOT_CONNECTED 0 /* for SHARP_LED_ACSTATUS */ +#define LED_AC_CONNECTED 1 /* for SHARP_LED_ACSTATUS */ + +#define LED_RSSI_OUT 0 /* for SHARP_LED_PHONE_RSSI */ +#define LED_RSSI_IN 1 /* for SHARP_LED_PHONE_RSSI */ + +#define LED_DIAL_OFF 0 /* for SHARP_LED_PHONE_DIAL */ +#define LED_DIAL_DIALING 1 /* for SHARP_LED_PHONE_DIAL */ +#define LED_DIAL_HOLDING 2 /* for SHARP_LED_PHONE_DIAL */ + +#define LED_PHONE_WAITING 0 /* for SHARP_LED_PHONE_IN */ +#define LED_PHONE_INCOMING 1 /* for SHARP_LED_PHONE_IN */ + +#define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ +#define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ +#define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ + +#define LED_SENDMAIL_OFF 0 /* for SHARP_LED_MAIL_SEND */ +#define LED_SENDMAIL_SENDING 1 /* for SHARP_LED_MAIL_SEND */ +#define LED_SENDMAIL_ERROR 2 /* for SHARP_LED_MAIL_SEND */ + +#define LED_MAILQUEUE_NOUNREAD 0 /* for SHARP_LED_MAIL_QUEUE */ +#define LED_MAILQUEUE_NEWMAIL 1 /* for SHARP_LED_MAIL_QUEUE */ +#define LED_MAILQUEUE_UNREAD 2 /* for SHARP_LED_MAIL_QUEUE */ + +#define LED_COLLIE_0_DEFAULT 0 /* for SHARP_LED_COLLIE_0 */ +#define LED_COLLIE_0_OFF 1 /* for SHARP_LED_COLLIE_0 */ +#define LED_COLLIE_0_ON 2 /* for SHARP_LED_COLLIE_0 */ +#define LED_COLLIE_0_FASTBLINK 3 /* for SHARP_LED_COLLIE_0 */ +#define LED_COLLIE_0_SLOWBLINK 4 /* for SHARP_LED_COLLIE_0 */ + +#define LED_COLLIE_1_DEFAULT 0 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_OFF 1 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_ON 2 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_FLASHON 3 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_FLASHOFF 4 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_VFSTBLINK 5 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_FASTBLINK 6 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_NORMBLINK 7 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_SLOWBLINK 8 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_SOFTBLINK 9 /* for SHARP_LED_COLLIE_1 */ +#define LED_COLLIE_1_SOFTFLASH 10 /* for SHARP_LED_COLLIE_1 */ + +#define LED_COMM_OFFLINE 0 /* for SHARP_LED_COMM */ +#define LED_COMM_ONLINE 1 /* for SHARP_LED_COMM */ +#define LED_COMM_ERROR 2 /* for SHARP_LED_COMM */ + +#define LED_BROWSER_OFFLINE 0 /* for SHARP_LED_BROWSER */ +#define LED_BROWSER_ONLINE 1 /* for SHARP_LED_BROWSER */ +#define LED_BROWSER_ERROR 2 /* for SHARP_LED_BROWSER */ + + +/* --- for SHARP_BUZZER device --- */ +#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) +#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) +#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) +#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) +#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) +#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) +#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) +#define SHARP_BUZZER_SET_BUFFER (SHARP_BUZZER_IOCTL_START+6) + +typedef struct sharp_buzzer_status { /* this struct is used for setvolume/getvolume */ + int which; /* select which LED status is wanted. */ + int volume; /* set new buzzer volume if you call SHARP_BUZZER_SETVOLUME */ + int mute; /* set 1 to MUTE if you call SHARP_BUZZER_SETMUTE */ +} sharp_buzzer_status; + +#define SHARP_BUZ_WHICH_MAX 14 /* last number of buzzer */ + +#define SHARP_BUZ_ALL_SOUNDS -1 /* for setting volumes of ALL sounds at a time */ + +#define SHARP_BUZ_WRITESOUND 0 /* for sound datas through 'write' calls */ +#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ +#define SHARP_BUZ_KEYSOUND 2 /* key sound */ +#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */ +#define SHARP_PDA_WARNSOUND 4 /* warning occurred */ +#define SHARP_PDA_ERRORSOUND 5 /* error occurred */ +#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */ +#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */ +#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */ +#define SHARP_PDA_APPSTART 9 /* application start */ +#define SHARP_PDA_APPQUIT 10 /* application ends */ +#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ +#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */ +#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */ +#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */ + +#define SHARP_BUZ_VOLUME_OFF 0 +#define SHARP_BUZ_VOLUME_LOW 33 +#define SHARP_BUZ_VOLUME_MEDIUM 67 +#define SHARP_BUZ_VOLUME_HIGH 100 /* currentry , this is the maximum ... */ +#define SHARP_BUZ_VOLUME_MAX (SHARP_BUZ_VOLUME_HIGH) + +/* --- for SHARP_GSM device --- */ +#define SHARP_GSM_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) +#define SHARP_GSM_GETEXTSTATUS (SHARP_GSM_IOCTL_START+16) +#define SHARP_GSM_INFO_TELL_MODE (SHARP_GSM_IOCTL_START+17) +#define SHARP_IRIS_GETSYNCSTATUS (SHARP_GSM_IOCTL_START+18) +#define SHARP_IRIS_RECHECKDEVICE (SHARP_GSM_IOCTL_START+19) + + +#define GSM_PHONE_NO_POWER 0 /* for SHARP_GSM_INFO_TELL_MODE */ +#define GSM_PHONE_NO_CONNECTION 1 /* for SHARP_GSM_INFO_TELL_MODE */ +#define GSM_PHONE_IN_ANALOG_MODE 2 /* for SHARP_GSM_INFO_TELL_MODE */ +#define GSM_PHONE_IN_DATA_MODE 3 /* for SHARP_GSM_INFO_TELL_MODE */ + +#define IRIS_AUDIO_EXT_IS_NONE 0 +#define IRIS_AUDIO_EXT_IS_HEADPHONEMIC 1 +#define IRIS_AUDIO_EXT_IS_EXTSPEAKER 2 + +typedef struct sharp_gsmext_status { + int carkit; /* be set as 1 , if car-kit is connected */ + int headphone_mic; /* be set as 1 , if head-phone-microphone is inserted */ + int external_sp; /* be set as 1 , if external-speaker is inserted */ +} sharp_gsmext_status; + +typedef struct sharp_irisext_status { /* for SHARP_IRIS_GETSYNCSTATUS */ + int usb; + int uart; + int carkit; +} sharp_irisext_status; + +/* --- for SHARP_AUDIOCTL device --- */ +#define SHARP_AUDIOCTL_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) +#define SHARP_AUDIOCTL_ARCH_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START+0x10) +#define SHARP_IRIS_AUFIL_GETVAL (SHARP_AUDIOCTL_ARCH_IOCTL_START+0) +#define SHARP_IRIS_AUFIL_SETVAL (SHARP_AUDIOCTL_ARCH_IOCTL_START+1) +#define SHARP_IRIS_AMP_EXT_ON (SHARP_AUDIOCTL_ARCH_IOCTL_START+2) +#define SHARP_IRIS_AMP_EXT_OFF (SHARP_AUDIOCTL_ARCH_IOCTL_START+3) + + +#define SHARP_IRIS_AUFIL_FILTERON 0x01 /* Iris AudioCtl Specific. Enable Audio Filter */ + +/* --- for SHARP_AUDIOCTL device --- */ +#define SHARP_KBDCTL_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) +#define SHARP_KBDCTL_GETMODIFSTAT (SHARP_KBDCTL_IOCTL_START+0) +#define SHARP_KBDCTL_TOGGLEMODIFSTAT (SHARP_KBDCTL_IOCTL_START+1) +#define SHARP_KBDCTL_SETHOLDTH (SHARP_KBDCTL_IOCTL_START+2) +#define SHARP_KBDCTL_SETHOLDTH_GR (SHARP_KBDCTL_IOCTL_START+3) +#define SHARP_KBDCTL_HOLDINFO_SETHD (SHARP_KBDCTL_IOCTL_START+4) +#define SHARP_KBDCTL_HOLDINFO_SETSL (SHARP_KBDCTL_IOCTL_START+5) +#define SHARP_KBDCTL_HOLDINFO_DELHD (SHARP_KBDCTL_IOCTL_START+6) +#define SHARP_KBDCTL_HOLDINFO_DELSL (SHARP_KBDCTL_IOCTL_START+7) +#define SHARP_KBDCTL_HOLDINFO_RESTHD (SHARP_KBDCTL_IOCTL_START+8) +#define SHARP_KBDCTL_HOLDINFO_RESTSL (SHARP_KBDCTL_IOCTL_START+9) +#define SHARP_KBDCTL_HOLDINFO_RESTFULL (SHARP_KBDCTL_IOCTL_START+10) +#define IRIS_KBDCTL_ENABLEKEYBOARD (SHARP_KBDCTL_IOCTL_START+16) +#define IRIS_KBDCTL_DISABLEKEYBOARD (SHARP_KBDCTL_IOCTL_START+17) +#define SHARP_KBDCTL_SENDKEY (SHARP_KBDCTL_IOCTL_START+18) + +typedef struct sharp_kbdctl_modifstat { + int which; + int stat; +} sharp_kbdctl_modifstat; + +typedef struct sharp_kbdctl_holdstat { + int group; + int timeout; +} sharp_kbdctl_holdstat; + +typedef struct sharp_kbdctl_holdcustom { + int normal_hardcode; + int normal_slcode; + int hold_slcode; +} sharp_kbdctl_holdcustom; + +#define SHARP_EXTMODIF_2ND 0x01 +#define SHARP_EXTMODIF_CAPS 0x02 +#define SHARP_EXTMODIF_NUMLOCK 0x03 + +#define HOLDKEY_GROUP_NORMAL 0 +#define HOLDKEY_GROUP_POWER 1 + + +/* --- for AUDIO & REMOCON device --- */ +#define HPJACK_STATE_UNDETECT (-1) +#define HPJACK_STATE_NONE (0) +#define HPJACK_STATE_HEADPHONE (1) +#define HPJACK_STATE_REMOCON (2) + + +#endif /* __ASM_SHARP_CHAR_H_INCLUDED */ + + +//#define EXTERNAL_IO_BASE01 0xF8000000 +//#define EXTEND_GPIO_RED_LED (1<<4) +//#define EXTEND_GPIO_GREEN_LED (1<<5) +//unsigned short * pwEGPIO1 ; +//unsigned short gwExtendGpio1; +// pwEGPIO1 = (unsigned short *) EXTERNAL_IO_BASE01; + + + + + + + + + diff --git a/qte/qte-2.3.8-snapshot/simpad.patch b/qte/qte-2.3.8-snapshot/simpad.patch index e69de29bb2..4fdb5b1adf 100644 --- a/qte/qte-2.3.8-snapshot/simpad.patch +++ b/qte/qte-2.3.8-snapshot/simpad.patch @@ -0,0 +1,403 @@ +diff -u qt-2.3.7.orig/src/kernel/qkeyboard_qws.cpp qt-2.3.7/src/kernel/qkeyboard_qws.cpp +--- qt-2.3.7.orig/src/kernel/qkeyboard_qws.cpp 2004-07-06 23:02:40.000000000 +0200 ++++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp 2004-07-06 23:03:00.000000000 +0200 +@@ -37,6 +37,7 @@ + #include <qapplication.h> + #include <qsocketnotifier.h> + #include <qnamespace.h> ++#include <qdatetime.h> + #include <qtimer.h> + + #include <stdlib.h> +@@ -131,6 +132,59 @@ + + #endif // QNX6 + ++/* ++ * SIMpad switches handler ++ * (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> ++ */ ++ ++//TODO: guard this against inclusion with #ifdef QT_QWS_SIMPAD ++ ++#include <linux/switches.h> ++#define SIMPAD_SWITCHES_DEVICE "/dev/misc/switches" ++ ++// switches from left top to right down over the SIMpad surface ++ ++#define SIMPAD_SWITCH_POWER 0x02 ++#define SIMPAD_SWITCH_UPPER 0x10 ++#define SIMPAD_SWITCH_UP 0x20 ++#define SIMPAD_SWITCH_DOWN 0x40 ++#define SIMPAD_SWITCH_LEFT 0x80 ++#define SIMPAD_SWITCH_RIGHT 0x100 ++#define SIMPAD_SWITCH_LOWER 0x8 ++ ++class QWSsimpadButtonsHandler : public QWSKeyboardHandler ++{ ++ Q_OBJECT ++ ++ public: ++ QWSsimpadButtonsHandler(); ++ virtual ~QWSsimpadButtonsHandler(); ++ ++ bool isOpen() { return fd > 0; } ++ ++ private slots: ++ void readSwitchesData(); ++ void autoRepeat(); ++ ++ private: ++ switches_mask_t switches; ++ ++ int fd; ++ int repeatdelay; ++ int repeatperiod; ++ ++ int lastCode; // last native code ++ int lastPress; // last press/release state ++ ++ int k; // last emitted Qt key code ++ int shiftKeyPressed; // true if one of the SHIFT keys has been pressed and not yet released ++ bool shiftUsed; // true if SHIFT has been used ++ ++ QTime eventTimer; // tracks time between raw events ++ QTimer* repeater; ++ QSocketNotifier *notifier; ++}; ++ + #ifdef QT_QWS_SL5XXX + static const QWSServer::KeyMap keyM[] = { + { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 00 +@@ -1479,7 +1533,11 @@ + } else { + type = spec; + } +- ++ if ( type == "SIMpad" ) ++ { ++ qDebug( "QWSKeyboardHandler: using SIMpad keyboard handler..." ); ++ handler = new QWSsimpadButtonsHandler(); ++ } + if ( type == "Buttons" ) { + #if defined(QT_QWS_YOPY) + handler = new QWSyopyButtonsHandler(); +@@ -1508,6 +1566,217 @@ + return keyM; + } + +-#endif // QT_NO_QWS_KEYBOARD + ++/* ++ * SIMpad switches handler ++ * (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> ++ */ ++ ++ ++QWSsimpadButtonsHandler::QWSsimpadButtonsHandler() ++ :QWSKeyboardHandler(), fd( -1 ), ++ repeatdelay( 700 ), repeatperiod( 80 ), ++ lastCode( 0 ), lastPress( 0 ), ++ k( -1 ), shiftKeyPressed( 0 ), shiftUsed( false ) ++{ ++ qDebug( "SimpadButtonsHandler() - V4.1" ); ++ fd = ::open( SIMPAD_SWITCHES_DEVICE, O_RDWR | O_NDELAY, 0 ); ++ if ( fd < 0 ) ++ { ++ qWarning( "SimpadButtonsHandler(): can't open %s", SIMPAD_SWITCHES_DEVICE ); ++ return; ++ } ++ ++ notifier = new QSocketNotifier( fd, QSocketNotifier::Read, this ); ++ connect( notifier, SIGNAL( activated(int) ),this, SLOT( readSwitchesData() ) ); ++ ++ repeater = new QTimer(this); ++ connect(repeater, SIGNAL(timeout()), this, SLOT(autoRepeat())); ++ ++} ++ ++ ++QWSsimpadButtonsHandler::~QWSsimpadButtonsHandler() ++{ ++ qDebug( "~SimpadButtonsHandler()" ); ++ if ( fd > 0 ) ++ { ++ ::close( fd ); ++ fd = -1; ++ } ++} ++ ++ ++void QWSsimpadButtonsHandler::readSwitchesData() ++{ ++ qDebug( "SimpadButtonsHandler() - detected switches action" ); ++ ++ if ( ::read( fd, &switches, sizeof switches ) < 0 ) ++ { ++ qWarning( "SimpadButtonsHandler() - switches read error!" ); ++ return; ++ } ++ ++ qDebug( "SimpadButtonsHandler() - Shift: %0x [used: %0x] + Event = %0x | %0x", ++ shiftKeyPressed, shiftUsed, switches.events[0], switches.states[0] ); ++ ++ bool press = switches.states[0]; // == switches.event[0]; ++ int code = switches.events[0]; ++ ++ //========================================================================= ++ ++ /** ++ * Work around a bug in the kernel keyboard driver emitting ++ * bogus events when pressing multiple switches at once ++ **/ ++ ++ if ( lastCode == 0 ) ++ { ++ // first press ever ++ eventTimer.start(); ++ lastPress = press; ++ lastCode = code; ++ } ++ else ++ { ++ int interval = eventTimer.restart(); ++ qDebug( "event interval = %d", interval ); ++ if ( code == lastCode && interval < 10 ) ++ { ++ qDebug( "event interval too small - ignoring bogus event" ); ++ qDebug( "did I say i hate buggy kernel drivers? :-D" ); ++ return; ++ } ++ ++ lastPress = press; ++ lastCode = code; ++ } ++ ++ /** ++ * Actually it may also be a hardware problem, but I really don't like ++ * to review kernel code for further inquiry. So just being lazy and ++ * do the workaround in user space :-D ++ **/ ++ ++ //===================================================================== ++ ++ if ( shiftKeyPressed ) ++ { ++ // a shift key obviously is being held ++ qDebug( "while shift key is being held..." ); ++ ++ if ( code != shiftKeyPressed ) ++ { ++ // another key is being touched - that means shift mode for us! ++ qDebug( " another key is being touched -> shift use now = true" ); ++ ++ shiftUsed = true; ++ ++ if ( shiftKeyPressed == SIMPAD_SWITCH_LOWER ) // SHIFT 1 ++ { ++ qDebug( " shift mode 1" ); ++ switch(code) ++ { ++ case SIMPAD_SWITCH_UP: k = Qt::Key_F9; break; // Shift1-Up = Calendar ++ case SIMPAD_SWITCH_DOWN: k = Qt::Key_F10; break; // Shift1-Down = Contacts ++ case SIMPAD_SWITCH_LEFT: k = Qt::Key_F13; break; // Shift1-Left = Mail ++ case SIMPAD_SWITCH_RIGHT: k = Qt::Key_F11; break; // Shift1-Up = Menu ++ case SIMPAD_SWITCH_UPPER: k = Qt::Key_F12; break; // Shift1-Upper = Home ++ default: k=-1; qWarning( "SimpadButtonsHandler() - unhandled event for Shift 1 !" ); break; ++ } ++ } ++ else if ( shiftKeyPressed == SIMPAD_SWITCH_UPPER ) // SHIFT 2 ++ { ++ qDebug( " shift mode 2" ); ++ switch(code) ++ { ++ case SIMPAD_SWITCH_UP: k = Qt::Key_F5; break; // Shift2-Up = F5 ++ case SIMPAD_SWITCH_DOWN: k = Qt::Key_F6; break; // Shift2-Down = F6 ++ case SIMPAD_SWITCH_LEFT: k = Qt::Key_F7; break; // Shift2-Left = F7 ++ case SIMPAD_SWITCH_RIGHT: k = Qt::Key_F8; break; // Shift2-Up = F8 ++ case SIMPAD_SWITCH_LOWER: k = Qt::Key_F9; break; // Shift2-Lower = F9 ++ default: k=-1; qWarning( "SimpadButtonsHandler() - unhandled event for Shift 2!" ); break; ++ } ++ } ++ } ++ else ++ { ++ qDebug( " shift key has been released. checking if being used..." ); ++ shiftKeyPressed = 0; ++ ++ if ( !shiftUsed ) ++ { ++ qDebug( " ... has _not_ being used -> really emit the key" ); ++ k = ( code == SIMPAD_SWITCH_UPPER ? Qt::Key_Escape : Qt::Key_Return ); ++ qDebug( "Emitting key = %d (pressed)", k ); ++ processKeyEvent( 0, k, 0, true, true ); ++ qDebug( "Emitting key = %d (released)", k ); ++ processKeyEvent( 0, k, 0, false, true ); ++ return; ++ } ++ else ++ { ++ qDebug( " ... has being used -> doing nothing" ); ++ return; ++ } ++ } ++ } ++ else ++ { ++ qDebug( "standard mode - no shift yet..." ); + ++ switch(code) ++ { ++ case SIMPAD_SWITCH_UP: k = Qt::Key_Up; break; ++ case SIMPAD_SWITCH_DOWN: k = Qt::Key_Down; break; ++ case SIMPAD_SWITCH_LEFT: k = Qt::Key_Left; break; ++ case SIMPAD_SWITCH_RIGHT: k = Qt::Key_Right; break; ++ ++ case SIMPAD_SWITCH_UPPER: k=-1; shiftKeyPressed = press? code:0; shiftUsed = false; qDebug( "shiftkey pressed now = %d", shiftKeyPressed ); return; ++ case SIMPAD_SWITCH_LOWER: k=-1; shiftKeyPressed = press? code:0; shiftUsed = false; qDebug( "shiftkey pressed now = %d", shiftKeyPressed ); return; ++ ++ default: k=-1; qWarning( "SimpadButtonsHandler() - unhandled event!" ); break; ++ } ++ } ++ ++ if ( k == -1 ) ++ { ++ qDebug( "no key to emit - returning." ); ++ return; ++ } ++ ++ bool repeatable = ( k == Qt::Key_Up || k == Qt::Key_Down || ++ k == Qt::Key_Right || k == Qt::Key_Left ); ++ ++ qDebug( "key to emit = %d [%s] [repeat=%s]", k, ++ press ? "press" : "release", ++ repeatable ? "true":"false" ); ++ ++ if ( qt_screen->isTransformed() && k >= Qt::Key_Left && k <= Qt::Key_Down ) ++ { ++ qDebug( "SimpadButtonsHandler() - We are transformed! Correcting..." ); ++ int oldK = k; ++ k = xform_dirkey( k ); ++ qDebug( "SimpadButtonsHandler() - Old Key: %d - New Key %d", oldK, k ); ++ } ++ ++ if ( repeatable && press ) ++ repeater->start( repeatdelay, true ); ++ else ++ repeater->stop(); ++ ++ qwsServer->processKeyEvent( 0, k, 0, press, false ); ++} ++ ++ ++void QWSsimpadButtonsHandler::autoRepeat() ++{ ++ qDebug( "Emitting key = %d (released)", k ); ++ processKeyEvent( 0, k, 0, false, true ); ++ qDebug( "Emitting key = %d (pressed)", k ); ++ processKeyEvent( 0, k, 0, true, true ); ++ repeater->start(repeatperiod); ++} ++ ++ ++#endif // QT_NO_QWS_KEYBOARD +diff -u qt-2.3.7.orig/src/kernel/qsoundqss_qws.cpp qt-2.3.7/src/kernel/qsoundqss_qws.cpp +--- qt-2.3.7.orig/src/kernel/qsoundqss_qws.cpp 2004-07-06 23:02:40.000000000 +0200 ++++ qt-2.3.7/src/kernel/qsoundqss_qws.cpp 2004-07-06 23:03:00.000000000 +0200 +@@ -47,8 +47,8 @@ + #include <sys/ioctl.h> + #include <sys/soundcard.h> + +-#define QT_QWS_SOUND_16BIT 1 // or 0, or undefined for always 0 +-#define QT_QWS_SOUND_STEREO 1 // or 0, or undefined for always 0 ++#define QT_QWS_SOUND_16BIT 0 // or 0, or undefined for always 0 ++#define QT_QWS_SOUND_STEREO 0 // or 0, or undefined for always 0 + + static int sound_speed = 44100; + #ifndef QT_NO_SOUNDSERVER +diff -u qt-2.3.7.orig/src/kernel/qwsmouse_qws.cpp qt-2.3.7/src/kernel/qwsmouse_qws.cpp +--- qt-2.3.7.orig/src/kernel/qwsmouse_qws.cpp 2004-07-06 23:02:39.000000000 +0200 ++++ qt-2.3.7/src/kernel/qwsmouse_qws.cpp 2004-07-06 22:57:44.000000000 +0200 +@@ -51,6 +51,7 @@ + #include <stdlib.h> + #include <stdio.h> + #include <sys/ioctl.h> ++#include <sys/time.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> +@@ -74,6 +75,7 @@ + unsigned short x; + unsigned short y; + unsigned short pad; ++ struct timeval stamp; + } TS_EVENT; + #elif defined(QT_QWS_SL5XXX) + #define QT_QWS_SL5XXX_RAW +@@ -1472,29 +1474,13 @@ + : samples(QT_QWS_TP_SAMPLE_SIZE), currSample(0), lastSample(0), + numSamples(0), skipCount(0) + { +-#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) +-#if defined(QT_QWS_IPAQ) +-# ifdef QT_QWS_IPAQ_RAW +- if ((mouseFD = open( "/dev/h3600_tsraw", O_RDONLY | O_NDELAY)) < 0) { +-# else +- if ((mouseFD = open( "/dev/h3600_ts", O_RDONLY | O_NDELAY)) < 0) { +-# endif +- qWarning( "Cannot open /dev/h3600_ts (%s)", strerror(errno)); +- return; +- } +-#elif defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) +-//# ifdef QT_QWS_SL5XXX_TSRAW +-# if 0 +- if ((mouseFD = open( "/dev/tsraw", O_RDONLY | O_NDELAY)) < 0) { +- qWarning( "Cannot open /dev/tsraw (%s)", strerror(errno)); +- return; +- } +-# else +- if ((mouseFD = open( "/dev/ts", O_RDONLY | O_NDELAY)) < 0) { +- qWarning( "Cannot open /dev/ts (%s)", strerror(errno)); ++#ifdef QT_QWS_SIMPAD ++ if ((mouseFD = open( "/dev/touchscreen/ucb1x00", O_RDONLY | O_NONBLOCK )) ++< 0) { ++ qWarning( "Cannot open /dev/touchscreen/ucb1x00 (%s)", strerror(errno) ++); + return; + } +-# endif + #endif + + QSocketNotifier *mouseNotifier; +@@ -1503,12 +1489,11 @@ + connect(mouseNotifier, SIGNAL(activated(int)),this, SLOT(readMouseData())); + waspressed=FALSE; + mouseIdx = 0; +-#endif + } + + QTPanelHandlerPrivate::~QTPanelHandlerPrivate() + { +-#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) || defined(QT_QWS_SIMPAD) + if (mouseFD >= 0) + close(mouseFD); + #endif +@@ -1516,7 +1501,7 @@ + + void QTPanelHandlerPrivate::readMouseData() + { +-#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) || defined(QT_QWS_SIMPAD) + if(!qt_screen) + return; + +@@ -1929,7 +1914,7 @@ + handler = new QCustomTPanelHandlerPrivate( mouseProtocol, mouseDev ); + #elif defined(QT_QWS_YOPY) + handler = new QYopyTPanelHandlerPrivate( mouseProtocol, mouseDev ); +-#elif defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) ++#elif defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) || defined(QT_QWS_SLC700) || defined(QT_QWS_SIMPAD) + handler = new QTPanelHandlerPrivate( mouseProtocol, mouseDev ); + #elif defined(QT_QWS_CASSIOPEIA) + handler = new QVrTPanelHandlerPrivate( mouseProtocol, mouseDev ); diff --git a/qte/qte-2.3.8-snapshot/switches.h b/qte/qte-2.3.8-snapshot/switches.h index e69de29bb2..37516b4c75 100644 --- a/qte/qte-2.3.8-snapshot/switches.h +++ b/qte/qte-2.3.8-snapshot/switches.h @@ -0,0 +1,74 @@ +/* + * linux/include/linux/switches.h + * + * Copyright (C) 2000 John Dorsey + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 23 October 2000 - created. + */ + +#if !defined(_LINUX_SWITCHES_H) +#define _LINUX_SWITCHES_H + +#define SWITCHES_MASK_SIZE (128) + +typedef unsigned long switches_bitfield; + +#define SWITCHES_BITS (sizeof(switches_bitfield) * 8) +#define SWITCHES_NUM_FIELDS (SWITCHES_MASK_SIZE / SWITCHES_BITS) +#define SWITCHES_FIELD_SELECT(i) ((i) / SWITCHES_BITS) +#define SWITCHES_FIELD_MASK(i) ((switches_bitfield)(1 << (i) % \ + SWITCHES_BITS)) + +typedef struct switches_mask_t { + unsigned int count; + switches_bitfield events[SWITCHES_NUM_FIELDS]; + switches_bitfield states[SWITCHES_NUM_FIELDS]; +} switches_mask_t; + +#define SWITCHES_ZERO(m) \ +do { \ + unsigned int sz_i; \ + (m)->count = 0; \ + for(sz_i = 0; sz_i < SWITCHES_NUM_FIELDS; ++sz_i) \ + (m)->events[sz_i] = (m)->states[sz_i] = 0; \ +} while (0) + +/* `s' is the state of the switch, either 0 or non-zero: */ +#define SWITCHES_SET(m, i, s) \ +do { \ + ((m)->events[SWITCHES_FIELD_SELECT((i))] |= \ + SWITCHES_FIELD_MASK((i))); \ + if(s) \ + ((m)->states[SWITCHES_FIELD_SELECT((i))] |= \ + SWITCHES_FIELD_MASK((i))); \ + else \ + ((m)->states[SWITCHES_FIELD_SELECT((i))] &= \ + ~SWITCHES_FIELD_MASK((i))); \ + ++((m)->count); \ +} while (0) + +/* Should only use to clear an event set by SWITCHES_SET(): */ +#define SWITCHES_CLEAR(m, i) \ +do { \ + ((m)->events[SWITCHES_FIELD_SELECT((i))] &= \ + ~SWITCHES_FIELD_MASK((i))); \ + ((m)->states[SWITCHES_FIELD_SELECT((i))] &= \ + ~SWITCHES_FIELD_MASK((i))); \ + --((m)->count); \ +} + +#define SWITCHES_COUNT(m) ((m)->count) + +/* Returns 0 or non-zero: */ +#define SWITCHES_EVENT(m, i) \ +((m)->events[SWITCHES_FIELD_SELECT((i))] & SWITCHES_FIELD_MASK((i))) + +/* Returns 0 or non-zero: */ +#define SWITCHES_STATE(m, i) \ +((m)->states[SWITCHES_FIELD_SELECT((i))] & SWITCHES_FIELD_MASK((i))) + +#endif /* !defined(_LINUX_SWITCHES_H) */ diff --git a/qte/qte-2.3.8-snapshot/tslib.patch b/qte/qte-2.3.8-snapshot/tslib.patch index e69de29bb2..27f8cb05f4 100644 --- a/qte/qte-2.3.8-snapshot/tslib.patch +++ b/qte/qte-2.3.8-snapshot/tslib.patch @@ -0,0 +1,349 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- qt-2.3.7/src/kernel/qwsmouse_qws.cpp~tslib.patch ++++ qt-2.3.7/src/kernel/qwsmouse_qws.cpp +@@ -7,6 +7,10 @@ + ** + ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. + ** ++** Portions Copyright (C) 2003 Texas Instruments, Inc. ++** Rights to said portions for use under the GPL and QPL licenses ++** are hereby granted to Trolltech AS. ++** + ** This file is part of the kernel module of the Qt GUI Toolkit. + ** + ** This file may be distributed and/or modified under the terms of the +@@ -59,6 +63,9 @@ + #ifdef QT_QWS_CASSIOPEIA + #include <linux/tpanel.h> + #endif ++#if QWS_TSLIB ++#include <tslib.h> ++#endif + + #if defined(QT_QWS_IPAQ) + #define QT_QWS_IPAQ_RAW +@@ -110,7 +117,7 @@ + + #ifndef QT_QWS_TP_JITTER_LIMIT + #define QT_QWS_TP_JITTER_LIMIT 2 +-#endif ++#endif + + //#define QWS_CUSTOMTOUCHPANEL + +@@ -1093,6 +1100,220 @@ + return sent; + } + ++ ++class QTSLibHandler : public QCalibratedMouseHandler ++{ ++ Q_OBJECT ++public: ++ QTSLibHandler(); ++ ~QTSLibHandler(); ++ ++ virtual void clearCalibration(); ++ virtual void calibrate( QWSPointerCalibrationData * ); ++ ++ static int sortByX( const void*, const void* ); ++ static int sortByY( const void*, const void* ); ++private: ++ void openTs(); ++ void closeTs(); ++ void interpolateSample(); ++ ++private: ++ bool raw; ++#ifdef QWS_TSLIB ++ struct tsdev *ts; ++#endif ++ QSocketNotifier *m_notify; ++ ++private slots: ++ void readMouseData(); ++}; ++ ++QTSLibHandler::QTSLibHandler() ++ : raw(false), m_notify(0l) ++{ ++ openTs(); ++} ++ ++QTSLibHandler::~QTSLibHandler() ++{ ++ closeTs(); ++} ++ ++void QTSLibHandler::openTs() ++{ ++#ifdef QWS_TSLIB ++ char *tsdevice; ++ ++ if( ( tsdevice = getenv( "TSLIB_TSDEVICE" ) ) != NULL ) { ++ ts = ts_open( tsdevice, 1 ); ++ } else { ++ ts = ts_open( "/dev/ts", 1 ); ++ } ++ ++ if (!ts) { ++ qWarning( "Cannot open touchscreen (%s)", strerror( errno ) ); ++ return; ++ } ++ ++ if (ts_config( ts )) { ++ qWarning( "Cannot configure touchscreen (%s)", strerror( errno ) ); ++ return; ++ } ++ ++ ++ m_notify = new QSocketNotifier( ts_fd(ts), QSocketNotifier::Read, this ); ++ connect( m_notify, SIGNAL( activated( int ) ), this, SLOT( readMouseData() ) ); ++#endif ++} ++ ++void QTSLibHandler::closeTs() ++{ ++#ifdef QWS_TSLIB ++ if (ts) ++ ts_close(ts); ++ ++ delete m_notify; ++ m_notify = 0; ts = 0; ++#endif ++ ++} ++ ++void QTSLibHandler::clearCalibration() ++{ ++ raw = true; ++} ++ ++ ++void QTSLibHandler::calibrate( QWSPointerCalibrationData *cd ) ++{ ++ QPoint dev_tl = cd->devPoints[ QWSPointerCalibrationData::TopLeft ]; ++ QPoint dev_br = cd->devPoints[ QWSPointerCalibrationData::BottomRight ]; ++ QPoint screen_tl = cd->screenPoints[ QWSPointerCalibrationData::TopLeft ]; ++ QPoint screen_br = cd->screenPoints[ QWSPointerCalibrationData::BottomRight ]; ++ int a, b, c, d, e, f, s; ++ ++ s = 1 << 16; ++ ++ a = s * (screen_tl.x() - screen_br.x() ) / (dev_tl.x() - dev_br.x()); ++ b = 0; ++ c = s * screen_tl.x() - a * dev_tl.x(); ++ ++ d = 0; ++ e = s * (screen_tl.y() - screen_br.y() ) / (dev_tl.y() - dev_br.y()); ++ f = s * screen_tl.y() - e * dev_tl.y(); ++ ++ QString calFile = "/etc/pointercal"; ++#ifndef QT_NO_TEXTSTREAM ++ QFile file( calFile ); ++ if ( file.open( IO_WriteOnly ) ) { ++ QTextStream t( &file ); ++ t << a << " " << b << " " << c << " "; ++ t << d << " " << e << " " << f << " " << s; ++ file.flush(); closeTs(); ++ openTs(); ++ } else ++#endif ++ { ++ qDebug( "Could not save calibration: %s", calFile.latin1() ); ++ } ++ raw = false; ++} ++ ++void QTSLibHandler::readMouseData() ++{ ++#ifdef QWS_TSLIB ++ if(!qt_screen) ++ return; ++ ++ /* ++ * After clear Calibration ++ * we're in raw mode and do some easy median ++ * search. ++ */ ++ if (raw ) ++ return interpolateSample(); ++ ++ static struct ts_sample sample; ++ static int ret; ++ ++ /* ++ * Ok. We need to see if we can read more than one event ++ * We do this not to lose an update. ++ */ ++ while ( true ) { ++ if ((ret = ts_read(ts, &sample, 1)) != 1 ) ++ return; ++ ++ ++ QPoint pos( sample.x, sample.y ); ++ emit mouseChanged( pos, sample.pressure != 0 ? 1 : 0 ); ++ } ++#endif ++} ++ ++ ++/* ++ * Lets take all down events and then sort them ++ * and take the event in the middle. ++ * ++ * inspired by testutils.c ++ */ ++void QTSLibHandler::interpolateSample() { ++ static struct ts_sample samples[25]; ++ int index = -1; ++ int ret; ++ ++ do { ++ index++; ++ /* fill only the last sample again */ ++ if ( index >= 25 ) ++ index = 24; ++ ++ /* we're opened non-blocking */ ++ if((ret= ts_read_raw(ts, &samples[index], 1 ) ) != 1 ) { ++ /* no event yet, so try again */ ++ if (ret==-1 ) { ++ index--; ++ continue; ++ } ++ } ++ }while (samples[index].pressure != 0); ++ ++ /* ++ * index is maximal 25 and we at least one sample ++ */ ++ int x, y; ++ ++ /* ++ * now let us use the median value ++ * even index does not have an item in the middle ++ * so let us take the average of n/2 and (n/2)-1 as the middle ++ */ ++ int m = index/2; ++ ::qsort(samples, index, sizeof(ts_sample), QTSLibHandler::sortByX); ++ x = (index % 2 ) ? samples[m].x : ++ ( samples[m-1].x + samples[m].x )/2; ++ ++ ::qsort(samples, index, sizeof(ts_sample), QTSLibHandler::sortByY); ++ y = (index % 2 ) ? samples[m].y : ++ ( samples[m-1].y + samples[m].y )/2; ++ ++ emit mouseChanged( QPoint(x, y), 1 ); ++ emit mouseChanged( QPoint(0, 0), 0 ); ++} ++ ++int QTSLibHandler::sortByX( const void* one, const void* two) { ++ return reinterpret_cast<const struct ts_sample*>(one)->x - ++ reinterpret_cast<const struct ts_sample*>(two)->x; ++} ++ ++int QTSLibHandler::sortByY( const void* one, const void* two) { ++ return reinterpret_cast<const struct ts_sample*>(one)->y - ++ reinterpret_cast<const struct ts_sample*>(two)->y; ++} ++ ++ + /* + * Handler for /dev/tpanel Linux kernel driver + */ +@@ -1235,7 +1456,7 @@ + + + QTPanelHandlerPrivate::QTPanelHandlerPrivate( MouseProtocol, QString dev ) +- : samples(QT_QWS_TP_SAMPLE_SIZE), currSample(0), lastSample(0), ++ : samples(QT_QWS_TP_SAMPLE_SIZE), currSample(0), lastSample(0), + numSamples(0), skipCount(0) + { + #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) +@@ -1315,7 +1536,7 @@ + mousePos = QPoint( 0, 0 ); + QPoint totalMousePos = oldTotalMousePos; + totalMousePos += samples[currSample]; +- if(numSamples >= samples.count()) ++ if(numSamples >= samples.count()) + totalMousePos -= samples[lastSample]; + + mousePos = totalMousePos / (sampleCount - 1); +@@ -1345,7 +1566,7 @@ + + // save recuring information + currSample++; +- if (numSamples >= samples.count()) ++ if (numSamples >= samples.count()) + lastSample++; + oldTotalMousePos = totalMousePos; + } else { +@@ -1658,7 +1879,7 @@ + + if ( mouseProto == "USB" && mouseDev.isEmpty() ) + mouseDev = "/dev/input/mice"; +- ++ + MouseProtocol mouseProtocol = Unknown; + + int idx = 0; +@@ -1689,12 +1910,14 @@ + break; + + case TPanel: +-#if defined(QWS_CUSTOMTOUCHPANEL) +- handler = new QCustomTPanelHandlerPrivate(mouseProtocol,mouseDev); ++#if defined(QWS_TSLIB) ++ handler = new QTSLibHandler( ); ++#elif defined(QWS_CUSTOMTOUCHPANEL) ++ handler = new QCustomTPanelHandlerPrivate( mouseProtocol, mouseDev ); + #elif defined(QT_QWS_YOPY) +- handler = new QYopyTPanelHandlerPrivate(mouseProtocol,mouseDev); ++ handler = new QYopyTPanelHandlerPrivate( mouseProtocol, mouseDev ); + #elif defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) +- handler = new QTPanelHandlerPrivate(mouseProtocol,mouseDev); ++ handler = new QTPanelHandlerPrivate( mouseProtocol, mouseDev ); + #elif defined(QT_QWS_CASSIOPEIA) + handler = new QVrTPanelHandlerPrivate( mouseProtocol, mouseDev ); + #endif +--- qt-2.3.7/configure~tslib.patch ++++ qt-2.3.7/configure +@@ -399,6 +399,9 @@ + -kde) + KDE=yes + ;; ++ -tslib) ++ TSLIB=yes ++ ;; + -no-g++-exceptions) + GPLUSPLUS_EXCEPTIONS=no + ;; +@@ -1255,6 +1258,9 @@ + set to point to a KDE 2 installation. + See http://www.kde.org + ++ -tslib ............. Use the TSLib (touchscreen access library) mouse handler ++ by default, instead of the normal device default. ++ + -no-g++-exceptions . Disable exceptions on platforms using the GNU C++ + compiler by using the -fno-exceptions flag. + +@@ -1314,6 +1320,13 @@ + [ "x$SM" = "xno" ] && QT_CXX="${QT_CXX} -DQT_NO_SM_SUPPORT" + [ "x$XFT" = "xyes" ] && QT_CXX="${QT_CXX} -DQT_XFT" + [ "x$XFT" = "xno" ] && QT_CXX="${QT_CXX} -DQT_NO_XKB" ++ ++if [ "x$TSLIB" = "xyes" ] ++then ++ QT_CXX="${QT_CXX} -DQWS_TSLIB" ++ QT_LIBS="${QT_LIBS} -lts" ++fi ++ + if [ "x$THREAD" = "xyes" ] + then + cat >src-mt.mk <<EOF diff --git a/qte/qte-2.3.8-snapshot/update-qtfontdir b/qte/qte-2.3.8-snapshot/update-qtfontdir index e69de29bb2..6df7b503af 100644 --- a/qte/qte-2.3.8-snapshot/update-qtfontdir +++ b/qte/qte-2.3.8-snapshot/update-qtfontdir @@ -0,0 +1,62 @@ +#!/bin/sh + +usage() +{ + echo "usage: $0 [font directory, defaults to QTDIR/lib/fonts]" + exit 1 +} + +setVar() +{ + eval "$1='$2'" +} + +getVar() +{ + eval "echo \$$1" +} + +handleQPF() +{ + base=`basename $1` + family=`echo $base|cut -d_ -f1` + pt=`echo $base|cut -d_ -f2` + weight=`echo $base|cut -d_ -f3|sed -e 's,i$,,'` + if (echo $base|cut -d_ -f3|grep -q 'i$'); then + italic="y" + else + italic="n" + fi + echo "$family $base.qpf QPF $italic $weight $pt u" +} + +if [ -z "$1" ]; then + if [ -n "$QTDIR" ]; then + fontdir=$QTDIR/lib/fonts + else + fontdir=/opt/QtPalmtop/lib/fonts + fi +else + fontdir=$1 +fi + +if ! [ -d $fontdir ]; then + echo Error: $fontdir not a directory + exit 1 +fi + +if [ -e $fontdir/fontdir ]; then + cat $fontdir/fontdir | grep -v '\.qpf' > $fontdir/fontdir.new +fi + +( + for file in `ls $fontdir/*.qpf|sed -e's,\.qpf$,,; s,_t[^_]*$,,;'|sort -u`; do + handleQPF $file + done +) >> $fontdir/fontdir.new + +mv $fontdir/fontdir.new $fontdir/fontdir + +exit 0 + +# vim:ai:et:sts=4:sw=4:tw=0: diff --git a/qte/qte-2.3.8-snapshot/vt-switch.patch b/qte/qte-2.3.8-snapshot/vt-switch.patch index e69de29bb2..be2745c986 100644 --- a/qte/qte-2.3.8-snapshot/vt-switch.patch +++ b/qte/qte-2.3.8-snapshot/vt-switch.patch @@ -0,0 +1,205 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- qt-2.3.7/src/kernel/qapplication_qws.cpp~vt-switch.patch ++++ qt-2.3.7/src/kernel/qapplication_qws.cpp +@@ -123,6 +123,12 @@ + static int qt_thread_pipe[2]; + #endif + ++#if defined(_OS_LINUX_) ++#include <sys/ioctl.h> ++#include <linux/vt.h> ++#include <linux/kd.h> ++#endif ++ + const int qwsSharedRamSize = 32 * 1024; //Small amount to fit on small devices. + + // These are in qapplication.cpp in qt/main +@@ -163,6 +169,8 @@ + bool qws_accel = TRUE; // ### never set + const char *qws_display_spec = ":0"; + int qws_display_id = 0; ++int qws_terminal_id = 0; ++int qws_terminal_old = 0; + int qws_client_id = 0; + QWidget *qt_pressGrab = 0; + QWidget *qt_mouseGrb = 0; +@@ -1628,6 +1636,15 @@ + type = QApplication::GuiServer; + } else if ( arg == "-interlaced" ) { + qws_screen_is_interlaced = TRUE; ++ } else if ( arg == "-terminal" ) { ++ if ( ++i < argc ) ++ { ++ if ( ( qws_terminal_id = atoi( argv[i] ) ) < 1 ) ++ { ++ qWarning( "Ignoring Invalid Terminal Specification." ); ++ qws_terminal_id = 0; ++ } ++ } + } else if ( arg == "-display" ) { + if ( ++i < argc ) + qws_display_spec = argv[i]; +@@ -1652,6 +1669,53 @@ + if ( type == QApplication::GuiServer ) { + qt_appType = type; + qws_single_process = TRUE; ++ ++ /* Allocate a dedicated virtual terminal -- (C) Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> ++ * Added a new command line option which only is relevant if the application is created as a GuiServer. ++ * The option is -terminal <num>, where <num> specifies the virtual terminal to be occupied by the server. ++ * As default in Linux, 0 means the current virtual terminal. ++ */ ++ #if defined(_OS_LINUX_) ++ if ( qws_terminal_id ) ++ { ++ qDebug( "qt_init() - terminal specification is '%d'.", qws_terminal_id ); ++ struct vt_stat console_stat; ++ int console_fd = ::open( QString().sprintf( "/dev/tty%d", qws_terminal_id ).latin1(), O_RDWR ); ++ if ( console_fd == -1) ++ { ++ qWarning( "qt_init() - can't open tty: %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ if ( ioctl( console_fd, VT_GETSTATE, &console_stat ) == -1 ) ++ { ++ qWarning( "qt_init() - can't ioctl(VT_GETSTATE): %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ qws_terminal_old = console_stat.v_active; ++ qDebug( "qt_init() - active vt is #%d, switching to #%d as requested...", qws_terminal_old, qws_terminal_id ); ++ ++ if ( ioctl( console_fd, VT_ACTIVATE, qws_terminal_id ) == -1 ) ++ { ++ qWarning( "qt_init() - can't ioctl(VT_ACTIVATE): %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ if ( ioctl( console_fd, VT_WAITACTIVE, qws_terminal_id ) == -1 ) ++ { ++ qWarning( "qt_init() - can't ioctl(VT_WAITACTIVE): %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ if ( ioctl( console_fd, KDSETMODE, KD_GRAPHICS ) == -1 ) ++ { ++ qWarning( "qt_init() - can't ioctl(KDSETMODE:KD_GRAPHICS): %s", strerror( errno ) ); ++ exit( -1 ); ++ } ++ ::close( console_fd ); ++ } ++ else ++ { ++ qDebug( "QWSApplication::qt_init() - current terminal specified." ); ++ } ++ #endif + QWSServer::startup(flags); + setenv("QWS_DISPLAY", qws_display_spec, 0); + } +@@ -1702,7 +1766,36 @@ + QFontManager::cleanup(); + + if ( qws_single_process ) { +- QWSServer::closedown(); ++ qDebug( "qt_cleanup() - shutting down QWSServer..." ); ++#ifndef QT_NO_QWS_KEYBOARD ++ if ( qwsServer ) ++ qwsServer->closeKeyboard(); ++#endif ++ QWSServer::closedown(); ++#if defined(_OS_LINUX_) ++ if ( qws_terminal_old > 0 ) ++ { ++ qDebug( "qt_cleanup() - switching back to virtual terminal #%d", qws_terminal_old ); ++ ++ int console_fd = ::open( "/dev/tty0", O_RDWR ); ++ if ( console_fd == -1) ++ { ++ qWarning( "qt_init() - can't open tty: %s", strerror( errno ) ); ++ } ++ else ++ { ++ if ( ioctl( console_fd, KDSETMODE, KD_TEXT ) == -1 ) ++ { ++ qWarning( "qt_init() - can't ioctl(KDSETMODE:KD_TEXT): %s", strerror( errno ) ); ++ } ++ if ( ioctl( console_fd, VT_ACTIVATE, qws_terminal_old ) == -1 ) ++ { ++ qWarning( "qt_init() - can't ioctl(VT_ACTIVATE): %s", strerror( errno ) ); ++ } ++ ::close( console_fd ); ++ } ++ } ++#endif + } + if ( qt_is_gui_used ) { + delete qt_fbdpy; +@@ -2584,7 +2677,7 @@ + if ( !widget ) { // don't know this window + if ( !QWidget::mouseGrabber() + #ifndef QT_NO_QWS_MANAGER +- && !QWSManager::grabbedMouse() ++ && !QWSManager::grabbedMouse() + #endif + ) { + qt_last_cursor = 0xffffffff; // cursor can be changed by another application +@@ -3394,7 +3487,7 @@ + #ifndef QT_NO_QWS_IM + if ( mouse.state&button && w != QInputContext::microFocusWidget() ) //button press + QInputContext::reset( oldFocus ); +-#endif ++#endif + QFocusEvent::setReason( QFocusEvent::Mouse); + w->setFocus(); + QFocusEvent::resetReason(); +@@ -3540,7 +3633,7 @@ + QApplication::sendEvent( widget, &enter ); + (*mouseInWidget) = widget; + #ifndef QT_NO_QWS_IM +- if ( e.type() == QEvent::MouseButtonPress && ++ if ( e.type() == QEvent::MouseButtonPress && + !widget->testWFlags( Qt::WStyle_Tool ) && + !widget->topLevelWidget()->testWFlags( Qt::WStyle_Tool ) ) + QInputContext::reset( oldFocus ); +--- qt-2.3.7/src/kernel/qkeyboard_qws.cpp~vt-switch.patch ++++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp +@@ -1068,6 +1068,24 @@ + { + if (kbdFD >= 0) + { ++ ++#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++ struct vt_mode vtMode; ++ ioctl(kbdFD, VT_GETMODE, &vtMode); ++ ++ /* Mickey says: "Better give up control of VT switching. ++ * Hey, I really hate that OS-will-reacquire-resources on process-death ++ * kind of thinking! ++ */ ++ vtMode.mode = VT_AUTO; ++ vtMode.relsig = 0; ++ vtMode.acqsig = 0; ++ ioctl(kbdFD, VT_SETMODE, &vtMode); ++ ++ signal(VTSWITCHSIG, 0); ++ qDebug( "~QWSTtyKeyboardHandler() - released VT." ); ++#endif ++ + #if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + ioctl(kbdFD, KDSKBMODE, K_XLATE); + #endif +--- qt-2.3.7/src/kernel/qgfxlinuxfb_qws.cpp~vt-switch.patch ++++ qt-2.3.7/src/kernel/qgfxlinuxfb_qws.cpp +@@ -251,9 +251,9 @@ + + bool QLinuxFbScreen::initDevice() + { +- // No blankin' screen, no blinkin' cursor!, no cursor! ++ /* 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)); ++ writeTerm(termctl,sizeof(termctl)); */ + + // Grab current mode so we can reset it + fb_var_screeninfo vinfo; |