|
|
@ -3472,13 +3472,26 @@ int TQApplication::x11ProcessEvent( XEvent* event )
|
|
|
|
// update the size for desktop widget
|
|
|
|
// update the size for desktop widget
|
|
|
|
int scr = XRRRootToScreen( appDpy, event->xany.window );
|
|
|
|
int scr = XRRRootToScreen( appDpy, event->xany.window );
|
|
|
|
TQWidget *w = desktop()->screen( scr );
|
|
|
|
TQWidget *w = desktop()->screen( scr );
|
|
|
|
TQSize oldSize( w->size() );
|
|
|
|
|
|
|
|
w->crect.setWidth( DisplayWidth( appDpy, scr ) );
|
|
|
|
if (w) {
|
|
|
|
w->crect.setHeight( DisplayHeight( appDpy, scr ) );
|
|
|
|
int widgetScr = -1;
|
|
|
|
if ( w->size() != oldSize ) {
|
|
|
|
// make sure the specified widget is on the same screen that received the XRandR event
|
|
|
|
TQResizeEvent e( w->size(), oldSize );
|
|
|
|
XWindowAttributes widgetAttr;
|
|
|
|
TQApplication::sendEvent( w, &e );
|
|
|
|
XGetWindowAttributes(appDpy, w->winId(), &widgetAttr);
|
|
|
|
emit desktop()->resized( scr );
|
|
|
|
if (widgetAttr.screen) {
|
|
|
|
|
|
|
|
widgetScr = XScreenNumberOfScreen(widgetAttr.screen);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((widgetScr < 0) || (widgetScr == 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
|
|
|
|
#endif // QT_NO_XRANDR
|
|
|
|