summaryrefslogtreecommitdiff
path: root/x11
authorzecke <zecke>2005-04-16 22:00:51 (UTC)
committer zecke <zecke>2005-04-16 22:00:51 (UTC)
commit632d3e87a7e2cf6efecb676987d622e937ecafb8 (patch) (unidiff)
tree6689c8549e494841108217daa21913ec27565720 /x11
parent790b371e6c7ed9da76eafb8a5b2e5d5458b320d8 (diff)
downloadopie-632d3e87a7e2cf6efecb676987d622e937ecafb8.zip
opie-632d3e87a7e2cf6efecb676987d622e937ecafb8.tar.gz
opie-632d3e87a7e2cf6efecb676987d622e937ecafb8.tar.bz2
Opie/X11:
Minor updates to build a recent Opie version for usage with the X Window System
Diffstat (limited to 'x11') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp26
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.h8
-rw-r--r--x11/libqpe-x11/qt/qwindowsystem_qws.h3
3 files changed, 26 insertions, 11 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp
index 73e7ce4..c49f3ad 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.cpp
+++ b/x11/libqpe-x11/qpe/qpeapplication.cpp
@@ -415,7 +415,7 @@ void QPEApplication::applyStyle() {
415int QPEApplication::defaultRotation() { 415int QPEApplication::defaultRotation() {
416 return 0; 416 return 0;
417} 417}
418void QPEApplication::setDefaultRotation(int r ) { 418void QPEApplication::setDefaultRotation(int) {
419 419
420} 420}
421void QPEApplication::grabKeyboard() { 421void QPEApplication::grabKeyboard() {
@@ -449,6 +449,14 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool m) {
449 d->show(mw, m ); 449 d->show(mw, m );
450} 450}
451void QPEApplication::showDialog( QDialog* d, bool nomax ) { 451void QPEApplication::showDialog( QDialog* d, bool nomax ) {
452 showWidget( d, nomax );
453}
454int QPEApplication::execDialog( QDialog* d, bool nomax) {
455 showDialog(d,nomax);
456 return d->exec();
457}
458
459void QPEApplication::showWidget( QWidget* d, bool nomax ) {
452 QSize sh = d->sizeHint(); 460 QSize sh = d->sizeHint();
453 int w = QMAX(sh.width(),d->width()); 461 int w = QMAX(sh.width(),d->width());
454 int h = QMAX(sh.height(),d->height()); 462 int h = QMAX(sh.height(),d->height());
@@ -456,16 +464,13 @@ void QPEApplication::showDialog( QDialog* d, bool nomax ) {
456 && ( w > qApp->desktop()->width()*3/4 464 && ( w > qApp->desktop()->width()*3/4
457 || h > qApp->desktop()->height()*3/4 ) ) 465 || h > qApp->desktop()->height()*3/4 ) )
458 { 466 {
459 d->showMaximized(); 467 d->showMaximized();
460 } else { 468 } else {
461 d->resize(w,h); 469 d->resize(w,h);
462 d->show(); 470 d->show();
463 } 471 }
464} 472}
465int QPEApplication::execDialog( QDialog* d, bool nomax) { 473
466 showDialog(d,nomax);
467 return d->exec();
468}
469void QPEApplication::setKeepRunning() { 474void QPEApplication::setKeepRunning() {
470 if ( qApp && qApp->inherits( "QPEApplication" ) ) { 475 if ( qApp && qApp->inherits( "QPEApplication" ) ) {
471 QPEApplication * qpeApp = ( QPEApplication* ) qApp; 476 QPEApplication * qpeApp = ( QPEApplication* ) qApp;
@@ -757,6 +762,7 @@ int QPEApplication::x11ClientMessage(QWidget* w, XEvent* event, bool b ) {
757#define KeyRelease XKeyRelease 762#define KeyRelease XKeyRelease
758 763
759#if defined(OPIE_NEW_MALLOC) 764#if defined(OPIE_NEW_MALLOC)
765#define likely(x) x
760 766
761// The libraries with the skiff package (and possibly others) have 767// The libraries with the skiff package (and possibly others) have
762// completely useless implementations of builtin new and delete that 768// completely useless implementations of builtin new and delete that
@@ -775,21 +781,25 @@ void* operator new( size_t size )
775 781
776void operator delete[]( void* p ) 782void operator delete[]( void* p )
777{ 783{
784 if ( likely(p) )
778 free( p ); 785 free( p );
779} 786}
780 787
781void operator delete[]( void* p, size_t /*size*/ ) 788void operator delete[]( void* p, size_t /*size*/ )
782{ 789{
790 if ( likely(p) )
783 free( p ); 791 free( p );
784} 792}
785 793
786void operator delete( void* p ) 794void operator delete( void* p )
787{ 795{
796 if ( likely(p) )
788 free( p ); 797 free( p );
789} 798}
790 799
791void operator delete( void* p, size_t /*size*/ ) 800void operator delete( void* p, size_t /*size*/ )
792{ 801{
802 if ( likely(p) )
793 free( p ); 803 free( p );
794} 804}
795 805
diff --git a/x11/libqpe-x11/qpe/qpeapplication.h b/x11/libqpe-x11/qpe/qpeapplication.h
index b1fc074..5521998 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.h
+++ b/x11/libqpe-x11/qpe/qpeapplication.h
@@ -7,8 +7,9 @@
7 7
8#include <qapplication.h> 8#include <qapplication.h>
9#include <qevent.h> 9#include <qevent.h>
10 10#include <qtopia/timestring.h>
11#include <qpe/timestring.h> 11#include <unistd.h>
12#include <stdlib.h>
12 13
13class QCopChannel; 14class QCopChannel;
14class QPEApplication : public QApplication { 15class QPEApplication : public QApplication {
@@ -46,7 +47,8 @@ public:
46 void showMainDocumentWidget( QWidget*, bool nomax = FALSE ); 47 void showMainDocumentWidget( QWidget*, bool nomax = FALSE );
47 48
48 static void showDialog( QDialog*, bool nomax = FALSE ); 49 static void showDialog( QDialog*, bool nomax = FALSE );
49 static int execDialog( QDialog*, bool nomax = FALSE ); 50 static int execDialog ( QDialog*, bool nomax = FALSE );
51 static void showWidget( QWidget*, bool nomax = FALSE );
50 52
51 static void setKeepRunning(); 53 static void setKeepRunning();
52 bool keepRunning()const; 54 bool keepRunning()const;
diff --git a/x11/libqpe-x11/qt/qwindowsystem_qws.h b/x11/libqpe-x11/qt/qwindowsystem_qws.h
index 88902c8..42470cd 100644
--- a/x11/libqpe-x11/qt/qwindowsystem_qws.h
+++ b/x11/libqpe-x11/qt/qwindowsystem_qws.h
@@ -10,6 +10,9 @@ QWSServer(){}
10~QWSServer(){} 10~QWSServer(){}
11 static void sendKeyEvent(int, int, int, bool, bool ) { } 11 static void sendKeyEvent(int, int, int, bool, bool ) { }
12 struct KeyboardFilter { 12 struct KeyboardFilter {
13 bool filter(int,int,int,bool,bool) {
14 return false;
15 }
13 }; 16 };
14 static void setKeyboardFilter( KeyboardFilter* ) { 17 static void setKeyboardFilter( KeyboardFilter* ) {
15 18