1 Suspend/Resume hooks for QScreen and usage from QApplication
2 Manuel Teira <manuel.teira@telefonica.net>
5 # Patch managed by http://www.holgerschurig.de/patcher.html
8 --- qt-2.3.10/src/kernel/qgfx_qws.h~suspend-resume-hooks
9 +++ qt-2.3.10/src/kernel/qgfx_qws.h
11 virtual int pixmapLinestepAlignment() { return 64; }
13 virtual void sync() {}
14 + virtual void prepareToSuspend() {}
15 + virtual void prepareToResume() {}
16 virtual bool onCard(unsigned char *) const;
17 virtual bool onCard(unsigned char *, ulong& out_offset) const;
19 --- qt-2.3.10/src/kernel/qapplication_qws.cpp~suspend-resume-hooks
20 +++ qt-2.3.10/src/kernel/qapplication_qws.cpp
22 int region_offset_window;
24 QWSQCopMessageEvent *qcop_response;
25 + bool manageAPMMessage( QWSQCopMessageEvent *e );
27 QWSEvent* current_event;
28 QValueList<int> unused_identifiers;
30 QWSQCopMessageEvent *pe = (QWSQCopMessageEvent*)e;
31 if ( pe->simpleData.is_response ) {
34 + } else if ( !manageAPMMessage( pe ) ) {
43 +bool QWSDisplayData::manageAPMMessage( QWSQCopMessageEvent *e )
45 + if ( e->channel.data() != QCString( "QPE/System" ) ) {
48 + if ( e->message.data() == QCString( "aboutToSuspend()" ) ) {
49 + if ( qt_screen ) qt_screen->prepareToSuspend();
53 + if ( e->message.data() == QCString( "returnFromSuspend()" ) ) {
54 + if ( qt_screen ) qt_screen->prepareToResume();
62 void QWSDisplayData::offsetPendingExpose( int window, const QPoint &offset )
64 if ( offset.isNull() )