diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-05-24 14:56:19 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-05-24 14:56:19 -0500 |
commit | 2a773ed1049018a063583baa0f0b73971dd5aee2 (patch) | |
tree | f02f4edc9a6c7b277ffc6effc1033469a1eed9d8 /src/kernel/qapplication_x11.cpp | |
parent | 38ae0b81dc5cd760afceb0a0384a988611b964c7 (diff) | |
parent | 5065da01ed2812708592345674ffcf6a2b43e002 (diff) | |
download | tqt3-2a773ed1049018a063583baa0f0b73971dd5aee2.tar.gz tqt3-2a773ed1049018a063583baa0f0b73971dd5aee2.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 0dbd6ce78..b3bf9b7f2 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -3462,6 +3462,27 @@ int TQApplication::x11ProcessEvent( XEvent* event ) return 0; } +#ifndef QT_NO_XRANDR + // XRandR doesn't care if TQt doesn't know about the widget, so handle XRandR stuff before the !widget check below + if (event->type == xrandr_eventbase + RRScreenChangeNotify + || ( event->type == ConfigureNotify && event->xconfigure.window == TQPaintDevice::x11AppRootWindow())) { + // update Xlib internals with the latest screen configuration + XRRUpdateConfiguration(event); + + // update the size for desktop widget + int scr = XRRRootToScreen( appDpy, event->xany.window ); + TQWidget *w = desktop()->screen( scr ); + TQSize oldSize( w->size() ); + w->crect.setWidth( DisplayWidth( appDpy, scr ) ); + w->crect.setHeight( DisplayHeight( appDpy, scr ) ); + if ( w->size() != oldSize ) { + TQResizeEvent e( w->size(), oldSize ); + TQApplication::sendEvent( w, &e ); + emit desktop()->resized( scr ); + } + } +#endif // QT_NO_XRANDR + if ( !widget ) { // don't know this windows TQWidget* popup = TQApplication::activePopupWidget(); if ( popup ) { @@ -3512,26 +3533,6 @@ int TQApplication::x11ProcessEvent( XEvent* event ) } #endif -#ifndef QT_NO_XRANDR - if (event->type == xrandr_eventbase + RRScreenChangeNotify - || ( event->type == ConfigureNotify && event->xconfigure.window == TQPaintDevice::x11AppRootWindow())) { - // update Xlib internals with the latest screen configuration - XRRUpdateConfiguration(event); - - // update the size for desktop widget - int scr = XRRRootToScreen( appDpy, event->xany.window ); - TQWidget *w = desktop()->screen( scr ); - TQSize oldSize( w->size() ); - w->crect.setWidth( DisplayWidth( appDpy, scr ) ); - w->crect.setHeight( DisplayHeight( appDpy, scr ) ); - if ( w->size() != oldSize ) { - TQResizeEvent e( w->size(), oldSize ); - TQApplication::sendEvent( w, &e ); - emit desktop()->resized( scr ); - } - } -#endif // QT_NO_XRANDR - switch ( event->type ) { case ButtonRelease: // mouse event |