|
|
@ -3462,6 +3462,27 @@ int TQApplication::x11ProcessEvent( XEvent* event )
|
|
|
|
return 0;
|
|
|
|
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
|
|
|
|
if ( !widget ) { // don't know this windows
|
|
|
|
TQWidget* popup = TQApplication::activePopupWidget();
|
|
|
|
TQWidget* popup = TQApplication::activePopupWidget();
|
|
|
|
if ( popup ) {
|
|
|
|
if ( popup ) {
|
|
|
@ -3512,26 +3533,6 @@ int TQApplication::x11ProcessEvent( XEvent* event )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#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 ) {
|
|
|
|
switch ( event->type ) {
|
|
|
|
|
|
|
|
|
|
|
|
case ButtonRelease: // mouse event
|
|
|
|
case ButtonRelease: // mouse event
|
|
|
|