summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrell Anderson <[email protected]>2012-05-24 14:56:14 -0500
committerDarrell Anderson <[email protected]>2012-05-24 14:56:14 -0500
commit1bcaf7bfacdb12822561266aa33b3bf10d906e3a (patch)
tree1f963cd1f016f823608fc34db214bf5f9547c385
parent3780084acf087000f62c10ae9a6c08981dccde00 (diff)
parent6ff026570df6bf0d2988e5e94465fc8d19ef2133 (diff)
downloadqt3-1bcaf7bfacdb12822561266aa33b3bf10d906e3a.tar.gz
qt3-1bcaf7bfacdb12822561266aa33b3bf10d906e3a.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/qt3
-rw-r--r--src/kernel/qapplication_x11.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
index 9f89c14..30220b4 100644
--- a/src/kernel/qapplication_x11.cpp
+++ b/src/kernel/qapplication_x11.cpp
@@ -3462,6 +3462,27 @@ int QApplication::x11ProcessEvent( XEvent* event )
return 0;
}
+#ifndef QT_NO_XRANDR
+ // XRandR doesn't care if Qt 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 == QPaintDevice::x11AppRootWindow())) {
+ // update Xlib internals with the latest screen configuration
+ XRRUpdateConfiguration(event);
+
+ // update the size for desktop widget
+ int scr = XRRRootToScreen( appDpy, event->xany.window );
+ QWidget *w = desktop()->screen( scr );
+ QSize oldSize( w->size() );
+ w->crect.setWidth( DisplayWidth( appDpy, scr ) );
+ w->crect.setHeight( DisplayHeight( appDpy, scr ) );
+ if ( w->size() != oldSize ) {
+ QResizeEvent e( w->size(), oldSize );
+ QApplication::sendEvent( w, &e );
+ emit desktop()->resized( scr );
+ }
+ }
+#endif // QT_NO_XRANDR
+
if ( !widget ) { // don't know this windows
QWidget* popup = QApplication::activePopupWidget();
if ( popup ) {
@@ -3512,26 +3533,6 @@ int QApplication::x11ProcessEvent( XEvent* event )
}
#endif
-#ifndef QT_NO_XRANDR
- if (event->type == xrandr_eventbase + RRScreenChangeNotify
- || ( event->type == ConfigureNotify && event->xconfigure.window == QPaintDevice::x11AppRootWindow())) {
- // update Xlib internals with the latest screen configuration
- XRRUpdateConfiguration(event);
-
- // update the size for desktop widget
- int scr = XRRRootToScreen( appDpy, event->xany.window );
- QWidget *w = desktop()->screen( scr );
- QSize oldSize( w->size() );
- w->crect.setWidth( DisplayWidth( appDpy, scr ) );
- w->crect.setHeight( DisplayHeight( appDpy, scr ) );
- if ( w->size() != oldSize ) {
- QResizeEvent e( w->size(), oldSize );
- QApplication::sendEvent( w, &e );
- emit desktop()->resized( scr );
- }
- }
-#endif // QT_NO_XRANDR
-
switch ( event->type ) {
case ButtonRelease: // mouse event